From: Kent Overstreet Date: Tue, 9 Jul 2013 00:53:26 +0000 (-0700) Subject: bcache: Trivial error handling fix X-Git-Tag: next-20140109~46^2~1^2~22 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5c41c8a713da7874bd79196696a275beeb11821e;p=karo-tx-linux.git bcache: Trivial error handling fix Signed-off-by: Kent Overstreet --- diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index e363efcf2b76..677a604e7f3f 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); }