diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-11-07 20:53:48 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:12:03 -0500 |
commit | 02e0e5e935cad59a2d30a004df9065e8697543e3 (patch) | |
tree | 3004e48f584f513d533017e21d116cf69411cc7a /drivers/net/wireless/prism54 | |
parent | 5398d5901dcb677d24d839d3feac7209e250b161 (diff) |
[PATCH] wireless: clean-up some "check return code" warnings
Clean-up some warnings from missing return code checks, mostly from
calling pci_enable_device during a PCI resume.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/prism54')
-rw-r--r-- | drivers/net/wireless/prism54/islpci_hotplug.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c index f6354b1cbc28..e0bca3abdf68 100644 --- a/drivers/net/wireless/prism54/islpci_hotplug.c +++ b/drivers/net/wireless/prism54/islpci_hotplug.c | |||
@@ -170,14 +170,15 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
170 | pci_set_master(pdev); | 170 | pci_set_master(pdev); |
171 | 171 | ||
172 | /* enable MWI */ | 172 | /* enable MWI */ |
173 | pci_set_mwi(pdev); | 173 | if (pci_set_mwi(pdev)) |
174 | goto do_pci_release_regions; | ||
174 | 175 | ||
175 | /* setup the network device interface and its structure */ | 176 | /* setup the network device interface and its structure */ |
176 | if (!(ndev = islpci_setup(pdev))) { | 177 | if (!(ndev = islpci_setup(pdev))) { |
177 | /* error configuring the driver as a network device */ | 178 | /* error configuring the driver as a network device */ |
178 | printk(KERN_ERR "%s: could not configure network device\n", | 179 | printk(KERN_ERR "%s: could not configure network device\n", |
179 | DRV_NAME); | 180 | DRV_NAME); |
180 | goto do_pci_release_regions; | 181 | goto do_pci_clear_mwi; |
181 | } | 182 | } |
182 | 183 | ||
183 | priv = netdev_priv(ndev); | 184 | priv = netdev_priv(ndev); |
@@ -207,6 +208,8 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
207 | pci_set_drvdata(pdev, NULL); | 208 | pci_set_drvdata(pdev, NULL); |
208 | free_netdev(ndev); | 209 | free_netdev(ndev); |
209 | priv = NULL; | 210 | priv = NULL; |
211 | do_pci_clear_mwi: | ||
212 | pci_clear_mwi(pdev); | ||
210 | do_pci_release_regions: | 213 | do_pci_release_regions: |
211 | pci_release_regions(pdev); | 214 | pci_release_regions(pdev); |
212 | do_pci_disable_device: | 215 | do_pci_disable_device: |
@@ -254,6 +257,8 @@ prism54_remove(struct pci_dev *pdev) | |||
254 | free_netdev(ndev); | 257 | free_netdev(ndev); |
255 | priv = NULL; | 258 | priv = NULL; |
256 | 259 | ||
260 | pci_clear_mwi(pdev); | ||
261 | |||
257 | pci_release_regions(pdev); | 262 | pci_release_regions(pdev); |
258 | 263 | ||
259 | pci_disable_device(pdev); | 264 | pci_disable_device(pdev); |
@@ -287,12 +292,19 @@ prism54_resume(struct pci_dev *pdev) | |||
287 | { | 292 | { |
288 | struct net_device *ndev = pci_get_drvdata(pdev); | 293 | struct net_device *ndev = pci_get_drvdata(pdev); |
289 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; | 294 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; |
290 | BUG_ON(!priv); | 295 | int err; |
291 | 296 | ||
292 | pci_enable_device(pdev); | 297 | BUG_ON(!priv); |
293 | 298 | ||
294 | printk(KERN_NOTICE "%s: got resume request\n", ndev->name); | 299 | printk(KERN_NOTICE "%s: got resume request\n", ndev->name); |
295 | 300 | ||
301 | err = pci_enable_device(pdev); | ||
302 | if (err) { | ||
303 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
304 | ndev->name); | ||
305 | return err; | ||
306 | } | ||
307 | |||
296 | pci_restore_state(pdev); | 308 | pci_restore_state(pdev); |
297 | 309 | ||
298 | /* alright let's go into the PREBOOT state */ | 310 | /* alright let's go into the PREBOOT state */ |