1
0
Fork 0

md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show

Commit c42d324099
("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@gmail.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
alistair/sunxi64-5.4-dsi
Marcos Paulo de Souza 2019-06-14 15:41:06 -07:00 committed by Jens Axboe
parent d9771f5ec4
commit 168b305b0c
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}