summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2023-03-24 18:51:27 +0100
committerDavid S. Miller <davem@davemloft.net>2023-03-27 09:41:56 +0200
commitd61157414d0a591d10d27d0ce5873916614e5e31 (patch)
tree2d205be7e35e65f25a738fd999496598a5c7ead7 /drivers/net/ethernet/sun
parentMerge branch 'octeon_ep-deferred-probe-and-mailbox' (diff)
downloadlinux-d61157414d0a591d10d27d0ce5873916614e5e31.tar.xz
linux-d61157414d0a591d10d27d0ce5873916614e5e31.zip
net: sunhme: Fix uninitialized return code
Fix an uninitialized return code if we never found a qfe slot. It would be a bug if we ever got into this situation, but it's good to return something tracable. Fixes: acb3f35f920b ("sunhme: forward the error code from pci_enable_device()") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r--drivers/net/ethernet/sun/sunhme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index b0c7ab74a82e..7cf8210ebbec 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2834,7 +2834,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
int i, qfe_slot = -1;
char prom_name[64];
u8 addr[ETH_ALEN];
- int err;
+ int err = -ENODEV;
/* Now make sure pci_dev cookie is there. */
#ifdef CONFIG_SPARC