提交 66284505 编写于 作者: A Alexey Khoroshilov 提交者: John W. Linville

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: NAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 a2ca8ecb
...@@ -6556,6 +6556,7 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -6556,6 +6556,7 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
il4965_prepare_card_hw(il); il4965_prepare_card_hw(il);
if (!il->hw_ready) { if (!il->hw_ready) {
IL_WARN("Failed, HW not ready\n"); IL_WARN("Failed, HW not ready\n");
err = -EIO;
goto out_iounmap; goto out_iounmap;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册