[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8022143.T7Z3S40VBb@eto.sf-tec.de>
Date: Thu, 03 Feb 2022 17:23:54 +0100
From: Rolf Eike Beer <eike-kernel@...tec.de>
To: netdev@...r.kernel.org
Subject: [PATCH 3/3] sunhme: forward the error code from pci_enable_device()
This already returns a proper error value, so pass it to the caller.
Signed-off-by: Rolf Eike Beer <eike-kernel@...tec.de>
---
drivers/net/ethernet/sun/sunhme.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 43834339bb43..980a936ce8d1 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2969,11 +2969,12 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
strcpy(prom_name, "SUNW,hme");
#endif
- err = -ENODEV;
+ err = pci_enable_device(pdev);
- if (pci_enable_device(pdev))
+ if (err)
goto err_out;
pci_set_master(pdev);
+ err = -ENODEV;
if (!strcmp(prom_name, "SUNW,qfe") || !strcmp(prom_name, "qfe")) {
qp = quattro_pci_find(pdev);
--
2.31.1
Powered by blists - more mailing lists