]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
usb: dwc3: pci: Fix pm_runtime_get_sync() error checking
authorZheng Yongjun <zhengyongjun3@huawei.com>
Fri, 22 Apr 2022 06:26:52 +0000 (06:26 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:52:37 +0000 (10:52 +0200)
commit199ce7ddbd39c90668fa9af4a40a08dcf999dfd3
tree8291b7e2c45206bcabb9cfbac4320ed445bc4d02
parentb5d6478d77fefefac8f5aa491eaa737273fa6fe3
usb: dwc3: pci: Fix pm_runtime_get_sync() error checking

BugLink: https://bugs.launchpad.net/bugs/1982968
[ Upstream commit a03e2ddab8e735e2cc315609b297b300e9cc60d2 ]

If the device is already in a runtime PM enabled state
pm_runtime_get_sync() will return 1, so a test for negative
value should be used to check for errors.

Fixes: 8eed00b237a28 ("usb: dwc3: pci: Runtime resume child device from wq")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20220422062652.10575-1-zhengyongjun3@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/dwc3/dwc3-pci.c