mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
floppy: do put_disk on current dr if blk_init_queue fails
If blk_init_queue fails, we do not call put_disk on the current dr (dr is decremented first in the error handling loop). Cc: [email protected] Reviewed-by: Ben Hutchings <[email protected]> Signed-off-by: Herton Ronaldo Krzesinski <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
b54e1f8889
commit
238ab78469
1 changed files with 1 additions and 0 deletions
|
|
@ -4150,6 +4150,7 @@ static int __init do_floppy_init(void)
|
|||
|
||||
disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock);
|
||||
if (!disks[dr]->queue) {
|
||||
put_disk(disks[dr]);
|
||||
err = -ENOMEM;
|
||||
goto out_put_disk;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue