]> git.baikalelectronics.ru Git - kernel.git/commit
can: xilinx_can: handle failure cases of pm_runtime_get_sync
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 5 Jun 2020 03:32:39 +0000 (22:32 -0500)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 3 Nov 2020 21:30:32 +0000 (22:30 +0100)
commit9a68d3391575766a8dc6967b74e458b95d6b3386
tree1d133bb2c7202da791ccdfb4e40f22350dd98966
parente8d17076d9d9cb2c3bc929536d802892f4225b40
can: xilinx_can: handle failure cases of pm_runtime_get_sync

Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20200605033239.60664-1-navid.emamdoost@gmail.com
Fixes: 643e74c1aeb7 ("can: xilinx: Convert to runtime_pm")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/xilinx_can.c