Skip to content

Commit 9e981bb

Browse files
author
Jakub Ramaseuski
committed
ionic: use int type for err in ionic_get_module_eeprom_by_page
JIRA: https://issues.redhat.com/browse/RHEL-121486 commit d586676 Author: Alok Tiwari <alok.a.tiwari@oracle.com> Date: Fri Sep 12 07:14:24 2025 -0700 ionic: use int type for err in ionic_get_module_eeprom_by_page The variable 'err' is declared as u32, but it is used to store negative error codes such as -EINVAL. Changing the type of 'err' to int ensures proper representation of negative error codes and aligns with standard kernel error handling conventions. Also, there is no need to initialize 'err' since it is always set before being used. Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Shannon Nelson <sln@onemain.com> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Link: https://patch.msgid.link/20250912141426.3922545-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Jakub Ramaseuski <jramaseu@redhat.com>
1 parent dc30f49 commit 9e981bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/pensando/ionic/ionic_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ static int ionic_get_module_eeprom_by_page(struct net_device *netdev,
978978
{
979979
struct ionic_lif *lif = netdev_priv(netdev);
980980
struct ionic_dev *idev = &lif->ionic->idev;
981-
u32 err = -EINVAL;
981+
int err;
982982
u8 *src;
983983

984984
if (!page_data->length)

0 commit comments

Comments
 (0)