aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Chamberlain <[email protected]>2021-08-18 16:45:42 +0200
committerJens Axboe <[email protected]>2021-08-23 12:55:46 -0600
commit10e7123d5551dec0025f70e61604ab57483a6ed2 (patch)
tree3bb5f6330e85b4c110b65ccf97cb5d137ba96b87
parentdbb301f91fc855dccf9bc42fbc4281d89365906d (diff)
null_blk: add error handling support for add_disk()
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. The actual cleanup in case of error is already handled by the caller of null_gendisk_register(). Signed-off-by: Luis Chamberlain <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--drivers/block/null_blk/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index f128242d1170..187d779c8ca0 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1717,8 +1717,7 @@ static int null_gendisk_register(struct nullb *nullb)
return ret;
}
- add_disk(disk);
- return 0;
+ return add_disk(disk);
}
static int null_init_tag_set(struct nullb *nullb, struct blk_mq_tag_set *set)