]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: sd: Free scsi_disk device via put_device()
authorMing Lei <ming.lei@redhat.com>
Mon, 6 Sep 2021 09:01:12 +0000 (17:01 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 14 Sep 2021 02:15:44 +0000 (22:15 -0400)
commit70b6c46f852ef8e3f162ce1f5148fb57dc7d5872
tree262bd64cc929b45002ca6a9ac9c898169d66067a
parente561bf939abaef028a57d29b3fc951d8b224288d
scsi: sd: Free scsi_disk device via put_device()

After a device is initialized via device_initialize() it should be freed
via put_device(). sd_probe() currently gets this wrong, fix it up.

Link: https://lore.kernel.org/r/20210906090112.531442-1-ming.lei@redhat.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c