]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
commit79c43333bdd5a7026a5aab606b53053b643585e7
tree1d133bb2c7202da791ccdfb4e40f22350dd98966
parente002103b36a695f7cb6048b96da73e66c86ddffb
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: 4716620d1b62 ("can: xilinx: Convert to runtime_pm")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/xilinx_can.c