md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>
Fri, 14 Jun 2019 22:41:06 +0000 (15:41 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 15 Jun 2019 07:37:34 +0000 (01:37 -0600)
commit168b305b0cfb7467a6691993f922ecbdcfc00c98
tree3a928b55d7bab6574639814574ce611f836d4582
parentd9771f5ec46c282d518b453c793635dbdc3a2a94
md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show

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@gmail.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c