[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200520121434.4927-1-dinghao.liu@zju.edu.cn>
Date: Wed, 20 May 2020 20:14:34 +0800
From: Dinghao Liu <dinghao.liu@....edu.cn>
To: dinghao.liu@....edu.cn, kjlu@....edu
Cc: Appana Durga Kedareswara rao <appana.durga.rao@...inx.com>,
Naga Sureshkumar Relli <naga.sureshkumar.relli@...inx.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Michal Simek <michal.simek@...inx.com>,
linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] can: xilinx_can: fix runtime pm imbalance on error
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@....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
Powered by blists - more mailing lists