Skip to content

Commit 2bd51c1

Browse files
author
Mohammad Kabat
committed
net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
Bugzilla: https://bugzilla.redhat.com/2112965 Upstream-status: v5.19-rc2 commit f5826c8 Author: Gal Pressman <gal@nvidia.com> Date: Mon Jun 6 14:57:18 2022 +0300 net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure The ioctl EEPROM query wrongly returns success on read failures, fix that by returning the appropriate error code. Fixes: 7202da8 ("ethtool, net/mlx4_en: Cable info, get_module_info/eeprom ethtool support") Signed-off-by: Gal Pressman <gal@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://lore.kernel.org/r/20220606115718.14233-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
1 parent 4d3f47c commit 2bd51c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/en_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ static int mlx4_en_get_module_eeprom(struct net_device *dev,
21102110
en_err(priv,
21112111
"mlx4_get_module_info i(%d) offset(%d) bytes_to_read(%d) - FAILED (0x%x)\n",
21122112
i, offset, ee->len - i, ret);
2113-
return 0;
2113+
return ret;
21142114
}
21152115

21162116
i += ret;

0 commit comments

Comments
 (0)