brd: fix name argument of unregister_blkdev()
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 20 Aug 2008 21:09:09 +0000 (14:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Aug 2008 22:40:30 +0000 (15:40 -0700)
The name of brd block device is "ramdisk", it's not "brd".
(The block device is registered by register_blkdev(RAMDISK_MAJOR, "ramdisk")
So it should be unregistered by unregister_blkdev(RAMDISK_MAJOR, "ramdisk")

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/brd.c

index 24b97b0bef994411bda31e377c041da6471ed9a2..d070d492e385b26893e34d514cbda0fa6cb5e34f 100644 (file)
@@ -571,8 +571,8 @@ out_free:
                list_del(&brd->brd_list);
                brd_free(brd);
        }
+       unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
 
-       unregister_blkdev(RAMDISK_MAJOR, "brd");
        return -ENOMEM;
 }