lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] media: atmel: atmel-isc: Fix PM disable depth imbalance in atmel_isc_probe
Date
The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Fixes: 0a0e265 ("media: atmel: atmel-isc: split driver into driver base and isc")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/media/platform/atmel/atmel-sama5d2-isc.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
index 1b2063cce0f7..88a81c3ada90 100644
--- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c
+++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
@@ -559,6 +559,9 @@ static int atmel_isc_probe(struct platform_device *pdev)
cleanup_subdev:
isc_subdev_cleanup(isc);

+disable_pm_runtime:
+ pm_runtime_disable(dev);
+
unregister_v4l2_device:
v4l2_device_unregister(&isc->v4l2_dev);

--
2.17.1
\
 
 \ /
  Last update: 2022-01-05 12:11    [W:0.126 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site