dm: add missing del_gendisk to alloc_dev error path
commit17f34f975f03e1cdad57fc04c590a750e2558d42
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 16 Oct 2009 22:18:15 +0000 (16 23:18 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:22:05 +0000 (9 16:22 -0800)
tree78d6d9034b73c1217fc48049b9a8b50d539af6f1
parent67060bc39921c6fea6c8ce2eceaf348038dbba89
dm: add missing del_gendisk to alloc_dev error path

commit 03022c54b9725026c0370a810168975c387ad04c upstream.

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'

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm.c