diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index bd2ae1d78fe1..05cb94664efe 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -2475,10 +2475,11 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr, kfree(sb); out_free_path: kfree(path); + path = NULL; out_module_put: module_put(THIS_MODULE); out: - pr_info("error %s: %s", path, err); + pr_info("error %s: %s", path?path:"", err); return ret; }