Commit 5c41c8a7 authored by Kent Overstreet's avatar Kent Overstreet

bcache: Trivial error handling fix

Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
parent c78afc62
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment