]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Apr 2022 08:33:52 +0000 (10:33 +0200)
commit8cc1d6fdffd6e2672c2f81ec43a2a051a0b05d0e
tree3a45927501b0cdaa88f4b4c0590bd4676f6ed091
parent2fccdb48f48b3818a0f63f652b9dde1043d362b4
usb: dwc3: pci: Fix pm_runtime_get_sync() error checking

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: 07976111fff8f ("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>
drivers/usb/dwc3/dwc3-pci.c