diff mbox series

[v2,2/2] scsi: core: remove dummy q->dev check

Message ID 1568277328-4597-3-git-send-email-stanley.chu@mediatek.com (mailing list archive)
State Mainlined
Commit b804049dce9128a88558bc1594ff96d6632fbc10
Headers show
Series [v2,1/2] block: bypass blk_set_runtime_active for uninitialized q->dev | expand

Commit Message

Stanley Chu Sept. 12, 2019, 8:35 a.m. UTC
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>
---
 drivers/scsi/scsi_pm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index 74ded5f3c236..3717eea37ecb 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -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);
 		}
 	}