Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: fix device_add_disk() kobject_create_and_add() error handling
Commit 83cbce9 ("block: add error handling for device_add_disk / add_disk") added error handling to device_add_disk(), however the goto label for the kobject_create_and_add() failure did not set the return value correctly, and so we can end up in a situation where kobject_create_and_add() fails but we report success. Fixes: 83cbce9 ("block: add error handling for device_add_disk / add_disk") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] [axboe: fold in followup fix from Wu Bo <[email protected]>] Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information