diff options
author | Joakim Zhang <qiangqing.zhang@nxp.com> | 2020-09-30 05:15:57 +0800 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2020-09-30 21:56:58 +0200 |
commit | 5a9323f55d52c9246ce85f2c9c6a8ec45413b1d0 (patch) | |
tree | a48d5524a5c706be3eda45bb0eeae0cb87a40bb7 | |
parent | 3aa2539536b323d17b12ebc15b1fbfdd33f020f7 (diff) |
can: flexcan: disable runtime PM if register flexcandev failed
Disable runtime PM if register flexcandev failed, and balance reference
of usage_count.
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Link: https://lore.kernel.org/r/20200929211557.14153-4-qiangqing.zhang@nxp.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | drivers/net/can/flexcan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 9cf1de42f428..fbdd9a8c9374 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -2057,6 +2057,8 @@ static int flexcan_probe(struct platform_device *pdev) return 0; failed_register: + pm_runtime_put_noidle(&pdev->dev); + pm_runtime_disable(&pdev->dev); free_candev(dev); return err; } |