From 662845057f2d063461c88a97b737ec7f66daece0 Mon Sep 17 00:00:00 2001 From: Alexey Khoroshilov Date: Sat, 19 Jan 2013 16:56:34 +0400 Subject: [PATCH] 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 Signed-off-by: John W. Linville --- drivers/net/wireless/iwlegacy/4965-mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 10fc249..f1dc040 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; } -- 2.7.4