projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
637208e
)
pf: add error handling support for add_disk()
author
Luis Chamberlain
<mcgrof@kernel.org>
Mon, 27 Sep 2021 22:01:56 +0000
(15:01 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 18 Oct 2021 20:41:37 +0000
(14:41 -0600)
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/paride/pf.c
patch
|
blob
|
history
diff --git
a/drivers/block/paride/pf.c
b/drivers/block/paride/pf.c
index f471d48a87bc179b8eb834c61bfcadebfe46e702..380d80e507c7a6f3d68429be9422e11325d4f4bd 100644
(file)
--- a/
drivers/block/paride/pf.c
+++ b/
drivers/block/paride/pf.c
@@
-962,7
+962,9
@@
static int __init pf_init_unit(struct pf_unit *pf, bool autoprobe, int port,
if (pf_probe(pf))
goto out_pi_release;
- add_disk(disk);
+ ret = add_disk(disk);
+ if (ret)
+ goto out_pi_release;
pf->present = 1;
return 0;