mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
[ Upstream commitf5826c8c9d] The ioctl EEPROM query wrongly returns success on read failures, fix that by returning the appropriate error code. Fixes:7202da8b7f("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>
This commit is contained in:
parent
c2ae49a113
commit
3d8122e169
|
|
@ -2099,7 +2099,7 @@ static int mlx4_en_get_module_eeprom(struct net_device *dev,
|
||||||
en_err(priv,
|
en_err(priv,
|
||||||
"mlx4_get_module_info i(%d) offset(%d) bytes_to_read(%d) - FAILED (0x%x)\n",
|
"mlx4_get_module_info i(%d) offset(%d) bytes_to_read(%d) - FAILED (0x%x)\n",
|
||||||
i, offset, ee->len - i, ret);
|
i, offset, ee->len - i, ret);
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
i += ret;
|
i += ret;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user