Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / drivers / block / brd.c
index 680cdfc..d070d49 100644 (file)
@@ -397,6 +397,7 @@ module_param(max_part, int, 0);
 MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
+MODULE_ALIAS("rd");
 
 #ifndef MODULE
 /* Legacy boot options - nonmodular */
@@ -570,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;
 }