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. Fixes: 03252259e18e ("scsi: sd: Clean up gendisk if device_add_disk() failed") Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9694e2cfaf9a6..986de990cf0f7 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3473,7 +3473,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; } -- 2.30.2