OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b6cabc
)
pcd: capture errors on cdrom_register()
author
Luis Chamberlain
<mcgrof@kernel.org>
Mon, 27 Sep 2021 22:01:09 +0000
(15:01 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 18 Oct 2021 20:41:36 +0000
(14:41 -0600)
No errors were being captured wehen cdrom_register() fails,
capture the error and return the error.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/paride/pcd.c
patch
|
blob
|
history
diff --git
a/drivers/block/paride/pcd.c
b/drivers/block/paride/pcd.c
index
82a654f
..
4cc0d14
100644
(file)
--- a/
drivers/block/paride/pcd.c
+++ b/
drivers/block/paride/pcd.c
@@
-940,7
+940,9
@@
static int pcd_init_unit(struct pcd_unit *cd, bool autoprobe, int port,
cd->present = 1;
pcd_probe_capabilities(cd);
- register_cdrom(cd->disk, &cd->info);
+ ret = register_cdrom(cd->disk, &cd->info);
+ if (ret)
+ goto out_pi_release;
ret = add_disk(cd->disk);
if (ret)
goto out_unreg_cdrom;