mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
pcd: capture errors on cdrom_register()
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>
This commit is contained in:
parent
2b6cabce39
commit
b6fa069971
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue