mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
net/mlx5e: Fix wrong return value on ioctl EEPROM query failure
commit0b89429722upstream. The ioctl EEPROM query wrongly returns success on read failures, fix that by returning the appropriate error code. Fixes:bb64143eee("net/mlx5e: Add ethtool support for dump module EEPROM") Signed-off-by: Gal Pressman <gal@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fd020eaaa2
commit
bc8f768af3
@@ -1746,7 +1746,7 @@ static int mlx5e_get_module_eeprom(struct net_device *netdev,
|
|||||||
if (size_read < 0) {
|
if (size_read < 0) {
|
||||||
netdev_err(priv->netdev, "%s: mlx5_query_eeprom failed:0x%x\n",
|
netdev_err(priv->netdev, "%s: mlx5_query_eeprom failed:0x%x\n",
|
||||||
__func__, size_read);
|
__func__, size_read);
|
||||||
return 0;
|
return size_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
i += size_read;
|
i += size_read;
|
||||||
|
|||||||
Reference in New Issue
Block a user