diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index 6e88142514fb..22f8565d2bf1 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c @@ -351,8 +351,8 @@ STORE(__cached_dev) if (!v) return size; } - - pr_err("Can't attach %s: cache set not found", buf); + if (v == -ENOENT) + pr_err("Can't attach %s: cache set not found", buf); return v; }