]> git.baikalelectronics.ru Git - kernel.git/commit
block: bypass blk_set_runtime_active for uninitialized q->dev
authorStanley Chu <stanley.chu@mediatek.com>
Thu, 12 Sep 2019 08:35:27 +0000 (16:35 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Sep 2019 13:11:56 +0000 (07:11 -0600)
commit9092edc231249e3efe20844e302fb22dc7d424f4
treee4a4960021786eeeae82b0785a39d8551513a116
parente20952aca6b2f26de5361512915e4a4866cd5271
block: bypass blk_set_runtime_active for uninitialized q->dev

Some devices may skip blk_pm_runtime_init() and have null pointer
in its request_queue->dev. For example, SCSI devices of UFS Well-Known
LUNs.

Currently the null pointer is checked by the user of
blk_set_runtime_active(), i.e., scsi_dev_type_resume(). It is better to
check it by blk_set_runtime_active() itself instead of by its users.

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-pm.c