summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2013-01-19 16:56:34 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-01-22 16:01:30 -0500
commit662845057f2d063461c88a97b737ec7f66daece0 (patch)
tree130f78401e8ccd4fd348b28a0ce3bc1671502a02 /drivers/net/wireless/iwlegacy
parenta2ca8ecb8ffc985e82c9570c3837408f7efe8c9d (diff)
downloadblackbird-op-linux-662845057f2d063461c88a97b737ec7f66daece0.tar.gz
blackbird-op-linux-662845057f2d063461c88a97b737ec7f66daece0.zip
iwlegacy: don't return zero on failure paths in il4965_pci_probe()
If hardware is not ready, il4965_pci_probe() breaks off initialization, deallocates all resources, but returns zero. The patch adds -EIO as return value in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 10fc2493f415..f1dc04006564 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -6556,6 +6556,7 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
il4965_prepare_card_hw(il);
if (!il->hw_ready) {
IL_WARN("Failed, HW not ready\n");
+ err = -EIO;
goto out_iounmap;
}
OpenPOWER on IntegriCloud