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>
This commit is contained in:
parent
3aa2539536
commit
5a9323f55d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue