On 10/12/2019 10.00, Joakim Zhang wrote:
Had better disable runtime PM if register flexcandev failed.
Signed-off-by: Joakim Zhang <qiangqing.zhang@xxxxxxx>
Tested-by: Sean Nyekjaer <sean@xxxxxxxxxx>
------
ChangeLog:
V1->V2: *no change.
---
drivers/net/can/flexcan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 3a754355ebe6..6c1ccf9f6c08 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1681,6 +1681,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;
}