]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: do not try to reconfigure APST when the controller is not live
authorChristoph Hellwig <hch@lst.de>
Fri, 9 Apr 2021 09:46:12 +0000 (11:46 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 21 Apr 2021 17:13:16 +0000 (19:13 +0200)
commitefb45f50ab8eba70d7d93d62a49e3b79e20158c5
treebf6faf3e9abf3a2ee8275a5a265f02583dd22cea
parente1dd389eae4cac77ec04abcb0e443b41499c44ad
nvme: do not try to reconfigure APST when the controller is not live

Do not call nvme_configure_apst when the controller is not live, given
that nvme_configure_apst will fail due the lack of an admin queue when
the controller is being torn down and nvme_set_latency_tolerance is
called from dev_pm_qos_hide_latency_tolerance.

Fixes: 3d89698fc3a8("nvme: fix memory leak for power latency tolerance")
Reported-by: Peng Liu <liupeng17@lenovo.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c