Skip to content

Commit

Permalink
net: sunhme: Fix uninitialized return code
Browse files Browse the repository at this point in the history
[ Upstream commit d611574 ]

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: acb3f35 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Forty-Bot authored and gregkh committed May 11, 2023
1 parent f29d5a8 commit 3173718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sun/sunhme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3173718

Please sign in to comment.