[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_205AA371C910BBA2CF01B311811ABDF2560A@qq.com>
Date: Tue, 28 Dec 2021 17:34:00 +0800
From: Peiwei Hu <jlu.hpw@...mail.com>
To: stas.yakovlev@...il.com, kvalo@...eaurora.org, davem@...emloft.net,
kuba@...nel.org
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, trivial@...nel.org,
Peiwei Hu <jlu.hpw@...mail.com>
Subject: [PATCH] ipw2100: inproper error handling of ipw2100_pci_init_one
goto fail instead of returning directly in error exiting
Signed-off-by: Peiwei Hu <jlu.hpw@...mail.com>
---
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 2ace2b27ecad..de043edc0521 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -6183,7 +6183,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
if (err) {
printk(KERN_WARNING DRV_NAME
"Error calling pci_enable_device.\n");
- return err;
+ goto fail;
}
priv = libipw_priv(dev);
@@ -6196,7 +6196,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
printk(KERN_WARNING DRV_NAME
"Error calling pci_set_dma_mask.\n");
pci_disable_device(pci_dev);
- return err;
+ goto fail;
}
err = pci_request_regions(pci_dev, DRV_NAME);
@@ -6204,7 +6204,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
printk(KERN_WARNING DRV_NAME
"Error calling pci_request_regions.\n");
pci_disable_device(pci_dev);
- return err;
+ goto fail;
}
/* We disable the RETRY_TIMEOUT register (0x41) to keep
--
2.25.1
Powered by blists - more mailing lists