Skip to content

Commit 10e7123

Browse files
mcgrofaxboe
authored andcommitted
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]>
1 parent dbb301f commit 10e7123

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/block/null_blk/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,8 +1717,7 @@ static int null_gendisk_register(struct nullb *nullb)
17171717
return ret;
17181718
}
17191719

1720-
add_disk(disk);
1721-
return 0;
1720+
return add_disk(disk);
17221721
}
17231722

17241723
static int null_init_tag_set(struct nullb *nullb, struct blk_mq_tag_set *set)

0 commit comments

Comments
 (0)