From: Alok Tiwari Date: Fri, 12 Sep 2025 14:14:24 +0000 (-0700) Subject: ionic: use int type for err in ionic_get_module_eeprom_by_page X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d586676a2714176bed06cf70467c4e08ac2d4681;p=users%2Fhch%2Fmisc.git 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 Reviewed-by: Shannon Nelson Reviewed-by: Brett Creeley Link: https://patch.msgid.link/20250912141426.3922545-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index 92f30ff2d631..2d9efadb5d2a 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -978,7 +978,7 @@ static int ionic_get_module_eeprom_by_page(struct net_device *netdev, { struct ionic_lif *lif = netdev_priv(netdev); struct ionic_dev *idev = &lif->ionic->idev; - u32 err = -EINVAL; + int err; u8 *src; if (!page_data->length)