* [PATCH] sx8: fix an error code in carm_init_one()
@ 2021-10-01 12:27 Dan Carpenter
2021-10-01 19:34 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-10-01 12:27 UTC (permalink / raw)
To: Jens Axboe, Luis Chamberlain; +Cc: linux-block, kernel-janitors
Return a negative error code here on this error path instead of
returning success.
Fixes: 1683818a4f1a ("block/sx8: add error handling support for add_disk()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/block/sx8.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 1c79248c4826..d1676fe0da1a 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -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,
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sx8: fix an error code in carm_init_one()
2021-10-01 12:27 [PATCH] sx8: fix an error code in carm_init_one() Dan Carpenter
@ 2021-10-01 19:34 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-10-01 19:34 UTC (permalink / raw)
To: Dan Carpenter, Luis Chamberlain; +Cc: linux-block, kernel-janitors
On 10/1/21 6:27 AM, Dan Carpenter wrote:
> Return a negative error code here on this error path instead of
> returning success.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-01 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 12:27 [PATCH] sx8: fix an error code in carm_init_one() Dan Carpenter
2021-10-01 19:34 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).