* [PATCH] can: xilinx_can: fix runtime pm imbalance on error
@ 2020-05-20 12:14 ` Dinghao Liu
0 siblings, 0 replies; 3+ messages in thread
From: Dinghao Liu @ 2020-05-20 12:14 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Naga Sureshkumar Relli, linux-kernel, netdev, Michal Simek,
linux-can, Marc Kleine-Budde, linux-arm-kernel,
Appana Durga Kedareswara rao, Jakub Kicinski, David S. Miller,
Wolfgang Grandegger
pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/net/can/xilinx_can.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index c1dbab8c896d..a9e8184cc611 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -1823,8 +1823,8 @@ static int xcan_probe(struct platform_device *pdev)
return 0;
err_disableclks:
- pm_runtime_put(priv->dev);
err_pmdisable:
+ pm_runtime_put(priv->dev);
pm_runtime_disable(&pdev->dev);
err_free:
free_candev(ndev);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] can: xilinx_can: fix runtime pm imbalance on error
@ 2020-05-20 12:14 ` Dinghao Liu
0 siblings, 0 replies; 3+ messages in thread
From: Dinghao Liu @ 2020-05-20 12:14 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Naga Sureshkumar Relli, linux-kernel, netdev, Michal Simek,
linux-can, Marc Kleine-Budde, linux-arm-kernel,
Appana Durga Kedareswara rao, Jakub Kicinski, David S. Miller,
Wolfgang Grandegger
pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/net/can/xilinx_can.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index c1dbab8c896d..a9e8184cc611 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -1823,8 +1823,8 @@ static int xcan_probe(struct platform_device *pdev)
return 0;
err_disableclks:
- pm_runtime_put(priv->dev);
err_pmdisable:
+ pm_runtime_put(priv->dev);
pm_runtime_disable(&pdev->dev);
err_free:
free_candev(ndev);
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] can: xilinx_can: fix runtime pm imbalance on error
@ 2020-05-20 12:14 ` Dinghao Liu
0 siblings, 0 replies; 3+ messages in thread
From: Dinghao Liu @ 2020-05-20 12:14 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Appana Durga Kedareswara rao, Naga Sureshkumar Relli,
Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
Jakub Kicinski, Michal Simek, linux-can, netdev,
linux-arm-kernel, linux-kernel
pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/net/can/xilinx_can.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index c1dbab8c896d..a9e8184cc611 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -1823,8 +1823,8 @@ static int xcan_probe(struct platform_device *pdev)
return 0;
err_disableclks:
- pm_runtime_put(priv->dev);
err_pmdisable:
+ pm_runtime_put(priv->dev);
pm_runtime_disable(&pdev->dev);
err_free:
free_candev(ndev);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-20 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 12:14 [PATCH] can: xilinx_can: fix runtime pm imbalance on error Dinghao Liu
2020-05-20 12:14 ` Dinghao Liu
2020-05-20 12:14 ` Dinghao Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.