mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
dm: add missing del_gendisk to alloc_dev error path
Add missing del_gendisk() to error path when creation of workqueue fails. Otherwice there is a resource leak and following warning is shown: WARNING: at fs/sysfs/dir.c:487 sysfs_add_one+0xc5/0x160() sysfs: cannot create duplicate filename '/devices/virtual/block/dm-0' Cc: [email protected] Signed-off-by: Zdenek Kabelac <[email protected]> Reviewed-by: Jonathan Brassow <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
This commit is contained in:
parent
bca915aae8
commit
03022c54b9
1 changed files with 1 additions and 0 deletions
|
|
@ -1822,6 +1822,7 @@ static struct mapped_device *alloc_dev(int minor)
|
|||
bad_bdev:
|
||||
destroy_workqueue(md->wq);
|
||||
bad_thread:
|
||||
del_gendisk(md->disk);
|
||||
put_disk(md->disk);
|
||||
bad_disk:
|
||||
blk_cleanup_queue(md->queue);
|
||||
|
|
|
|||
Loading…
Reference in a new issue