Skip to content

Commit

Permalink
iwlegacy: don't return zero on failure paths in il4965_pci_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Khoroshilov authored and John W. Linville committed Jan 22, 2013
1 parent a2ca8ec commit 6628450
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlegacy/4965-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6628450

Please sign in to comment.