Skip to content

Commit 7274ce0

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
scsi: sd: Don't call blk_cleanup_disk() in sd_probe()
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/[email protected] Fixes: 0325225 ("scsi: sd: Clean up gendisk if device_add_disk() failed") Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 476e459 commit 7274ce0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3523,7 +3523,7 @@ static int sd_probe(struct device *dev)
35233523
error = device_add_disk(dev, gd, NULL);
35243524
if (error) {
35253525
put_device(&sdkp->disk_dev);
3526-
blk_cleanup_disk(gd);
3526+
put_disk(gd);
35273527
goto out;
35283528
}
35293529

0 commit comments

Comments
 (0)