net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
authorGal Pressman <gal@nvidia.com>
Mon, 6 Jun 2022 11:57:18 +0000 (14:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:17 +0000 (18:36 +0200)
commit403659df77b633ade9eb14ab816ea18007eabdf5
tree25ac3225bc4b9ff5333ef4ec00fae65ca4c2206c
parent54d6802c4d83fa8de7696cfec06f475d5fd92d27
net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure

[ Upstream commit f5826c8c9d57210a17031af5527056eefdc2b7eb ]

The ioctl EEPROM query wrongly returns success on read failures, fix
that by returning the appropriate error code.

Fixes: 7202da8b7f71 ("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: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c