diff mbox series

[RFC,04/12] scsi/sd: use blk_cleanup_queue() insted of put_disk()

Message ID 20210715205920.2023980-5-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series block: *add_disk*() driver conversions __register_blkdev() | expand

Commit Message

Luis Chamberlain July 15, 2021, 8:59 p.m. UTC
The single put_disk() is useful if you know you're not doing
a cleanup after add_disk(), but since we want to add support
for that, just use the normal form of blk_cleanup_disk() to
cleanup the queue and put the disk.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 drivers/scsi/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 6d2d63629a90..6d0a82da7131 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3510,7 +3510,7 @@  static int sd_probe(struct device *dev)
  out_free_index:
 	ida_free(&sd_index_ida, index);
  out_put:
-	put_disk(gd);
+	blk_cleanup_disk(gd);
  out_free:
 	sd_zbc_release_disk(sdkp);
 	kfree(sdkp);