From: Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx> Commit c42d3240990814eec1e4b2b93fa0487fc4873aed ("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to return -ENODEV when rdev->mddev is NULL, now do the same to rdev_attr_show. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx> Signed-off-by: Song Liu <songliubraving@xxxxxx> --- drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 04f4f131f9d6..86f4f2b5a724 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3356,7 +3356,7 @@ rdev_attr_show(struct kobject *kobj, struct attribute *attr, char *page) if (!entry->show) return -EIO; if (!rdev->mddev) - return -EBUSY; + return -ENODEV; return entry->show(rdev, page); } -- 2.17.1