bcache: Trivial error handling fix
authorKent Overstreet <kmo@daterainc.com>
Tue, 9 Jul 2013 00:53:26 +0000 (17:53 -0700)
committerKent Overstreet <kmo@daterainc.com>
Wed, 8 Jan 2014 21:05:10 +0000 (13:05 -0800)
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/super.c

index e363efcf2b76b5e1bc7aaca90788fb44533ec3d3..677a604e7f3fc809c3e23739b41fa529ecbbe1f8 100644 (file)
@@ -2065,7 +2065,8 @@ static void bcache_exit(void)
                kobject_put(bcache_kobj);
        if (bcache_wq)
                destroy_workqueue(bcache_wq);
-       unregister_blkdev(bcache_major, "bcache");
+       if (bcache_major)
+               unregister_blkdev(bcache_major, "bcache");
        unregister_reboot_notifier(&reboot);
 }