summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/super.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-07-09 00:53:26 (GMT)
committerKent Overstreet <kmo@daterainc.com>2014-01-08 21:05:10 (GMT)
commit5c41c8a713da7874bd79196696a275beeb11821e (patch)
tree5db4d73cdaad1d55b29ebc46e6909fbbde9904f4 /drivers/md/bcache/super.c
parentc78afc6261b09f74abff8c0719b80692a4959768 (diff)
downloadlinux-5c41c8a713da7874bd79196696a275beeb11821e.tar.xz
bcache: Trivial error handling fix
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/super.c')
-rw-r--r--drivers/md/bcache/super.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index e363efc..677a604 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -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);
}