]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: cdns3: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 21 May 2020 07:39:19 +0000 (15:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:26 +0000 (17:48 +0200)
commitcd2c9acd3b0b915f5afbd4f0a2ac83f9b56689ec
tree8e627249244784a4b234e73df650b1a57b8ee3d0
parentf3922d1a65cd8f8287be624e1c68f7d3beaba1b1
usb: cdns3: Fix runtime PM imbalance on error

[ Upstream commit e5b913496099527abe46e175e5e2c844367bded0 ]

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/cdns3/cdns3-ti.c