From: Sean Anderson <seanga2@gmail.com>
To: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Cc: Simon Horman <simon.horman@corigine.com>,
linux-kernel@vger.kernel.org, Sean Anderson <seanga2@gmail.com>,
kernel test robot <lkp@intel.com>,
Dan Carpenter <error27@gmail.com>
Subject: [PATCH net-next v4 01/10] net: sunhme: Fix uninitialized return code
Date: Fri, 24 Mar 2023 13:51:27 -0400 [thread overview]
Message-ID: <20230324175136.321588-2-seanga2@gmail.com> (raw)
In-Reply-To: <20230324175136.321588-1-seanga2@gmail.com>
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>
---
Changes in v4:
- Move this fix to its own commit
drivers/net/ethernet/sun/sunhme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.37.1
next prev parent reply other threads:[~2023-03-24 17:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 17:51 [PATCH net-next v4 00/10] net: sunhme: Probe/IRQ cleanups Sean Anderson
2023-03-24 17:51 ` Sean Anderson [this message]
2023-03-25 8:17 ` [PATCH net-next v4 01/10] net: sunhme: Fix uninitialized return code Simon Horman
2023-03-25 8:26 ` Simon Horman
2023-03-24 17:51 ` [PATCH net-next v4 02/10] net: sunhme: Just restart autonegotiation if we can't bring the link up Sean Anderson
2023-03-24 17:51 ` [PATCH net-next v4 03/10] net: sunhme: Remove residual polling code Sean Anderson
2023-03-24 17:51 ` [PATCH net-next v4 04/10] net: sunhme: Unify IRQ requesting Sean Anderson
2023-03-24 17:51 ` [PATCH net-next v4 05/10] net: sunhme: Alphabetize includes Sean Anderson
2023-03-24 17:51 ` [PATCH net-next v4 06/10] net: sunhme: Switch SBUS to devres Sean Anderson
2023-03-24 17:51 ` [PATCH net-next v4 07/10] net: sunhme: Consolidate mac address initialization Sean Anderson
2023-03-24 17:51 ` [PATCH net-next v4 08/10] net: sunhme: Clean up mac address init Sean Anderson
2023-03-24 17:51 ` [PATCH net-next v4 09/10] net: sunhme: Inline error returns Sean Anderson
2023-03-25 8:24 ` Simon Horman
2023-03-25 8:29 ` Simon Horman
2023-03-24 17:51 ` [PATCH net-next v4 10/10] net: sunhme: Consolidate common probe tasks Sean Anderson
2023-03-25 9:10 ` Simon Horman
2023-03-25 16:06 ` Sean Anderson
2023-03-26 7:57 ` Simon Horman
2023-03-27 7:50 ` [PATCH net-next v4 00/10] net: sunhme: Probe/IRQ cleanups patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230324175136.321588-2-seanga2@gmail.com \
--to=seanga2@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox