diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-11-03 17:40:23 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-05 06:21:03 +0100 |
commit | fe7d064fa3faec5d8157029fb8720b4fddc9e1e8 (patch) | |
tree | 710618c7ae9e4141b12e3e1a00251c493e5f748d /certs | |
parent | block: ensure cached plug request matches the current queue (diff) | |
download | linux-fe7d064fa3faec5d8157029fb8720b4fddc9e1e8.tar.xz linux-fe7d064fa3faec5d8157029fb8720b4fddc9e1e8.zip |
block: fix device_add_disk() kobject_create_and_add() error handling
Commit 83cbce957446 ("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: 83cbce957446 ("block: add error handling for device_add_disk / add_disk")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211103164023.1384821-1-mcgrof@kernel.org
[axboe: fold in followup fix from Wu Bo <wubo40@huawei.com>]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions