mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
scsi: sd: Don't call blk_cleanup_disk() in sd_probe()
[ Upstream commit7274ce0558
] In SCSI the midlayer has ownership of the request_queue, so on probe failure we must only put the gendisk, but leave the request_queue alone. Link: https://lore.kernel.org/r/20220523083813.227935-1-hch@lst.de Fixes:03252259e1
("scsi: sd: Clean up gendisk if device_add_disk() failed") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
27efaafff2
commit
0a9cd23d29
1 changed files with 1 additions and 1 deletions
|
@ -3475,7 +3475,7 @@ static int sd_probe(struct device *dev)
|
|||
error = device_add_disk(dev, gd, NULL);
|
||||
if (error) {
|
||||
put_device(&sdkp->disk_dev);
|
||||
blk_cleanup_disk(gd);
|
||||
put_disk(gd);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue