[v2] driver: bdisp: add pm_runtime_disable in the error handling code

Message ID 20211019030808.3327043-1-mudongliangabcd@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Hans Verkuil
Headers
Series [v2] driver: bdisp: add pm_runtime_disable in the error handling code |

Commit Message

Dongliang Mu Oct. 19, 2021, 3:08 a.m. UTC
  In the error handling code of bdisp_probe, it fails to invoke
pm_runtime_disable in many error sites.

Fix this by adding pm_runtime_disable at the label err_remove.

Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
---
v1->v2: move pm_runtime_disable from the end of label err_pm to
	the beginning of err_remove
 drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index 6413cd279125..01cc8b577ad4 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -1395,6 +1395,7 @@  static int bdisp_probe(struct platform_device *pdev)
 err_pm:
 	pm_runtime_put(dev);
 err_remove:
+	pm_runtime_disable(dev);
 	bdisp_debugfs_remove(bdisp);
 	v4l2_device_unregister(&bdisp->v4l2_dev);
 err_clk: