]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
scsi: core: remove dummy q->dev check
authorStanley Chu <stanley.chu@mediatek.com>
Thu, 12 Sep 2019 08:35:28 +0000 (16:35 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Sep 2019 13:11:58 +0000 (07:11 -0600)
Currently blk_set_runtime_active() is checking if q->dev is null by
itself, thus remove the same checking in its user: scsi_dev_type_resume().

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_pm.c

index 74ded5f3c23675ba7c3be2b312601aa11c48be0c..3717eea37ecb386fd772e6dd90182b3674d41ceb 100644 (file)
@@ -94,8 +94,7 @@ static int scsi_dev_type_resume(struct device *dev,
                if (!err && scsi_is_sdev_device(dev)) {
                        struct scsi_device *sdev = to_scsi_device(dev);
 
-                       if (sdev->request_queue->dev)
-                               blk_set_runtime_active(sdev->request_queue);
+                       blk_set_runtime_active(sdev->request_queue);
                }
        }