mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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 <mcgrof@kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20210818144542.19305-12-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
dbb301f91f
commit
10e7123d55
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user