Commit 5deae20c authored by Dan Carpenter's avatar Dan Carpenter Committed by Jens Axboe

sx8: fix an error code in carm_init_one()

Return a negative error code here on this error path instead of
returning success.

Fixes: 637208e7 ("block/sx8: add error handling support for add_disk()")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211001122722.GC2283@kiliSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent cfc03eab
......@@ -1511,8 +1511,10 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
DPRINTK("waiting for probe_comp\n");
host->probe_err = -ENODEV;
wait_for_completion(&host->probe_comp);
if (host->probe_err)
if (host->probe_err) {
rc = host->probe_err;
goto err_out_free_irq;
}
printk(KERN_INFO "%s: pci %s, ports %d, io %llx, irq %u, major %d\n",
host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment