On Wed Jul 15 12:43:14 2026 +0100, Dave Stevenson wrote:
> If v4l2_async_register_subdev_sensor failed, then the sensor had
> already been powered down by pm_runtime_idle, but the error path
> then also explicitly called imx355_power_off as well. That left
> an imbalance in the regulator and clock calls.
> 
> Call pm_runtime_idle only after v4l2_async_register_subdev_sensor
> succeeds to avoid this.
> 
> Fixes: efa5fe19c0a9 ("media: imx355: Enable runtime PM before registering 
> async sub-device")
> Cc: [email protected]
> Signed-off-by: Dave Stevenson <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/i2c/imx355.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
index 27a5c212a527..ac59908f57aa 100644
--- a/drivers/media/i2c/imx355.c
+++ b/drivers/media/i2c/imx355.c
@@ -1822,12 +1822,13 @@ static int imx355_probe(struct i2c_client *client)
         */
        pm_runtime_set_active(imx355->dev);
        pm_runtime_enable(imx355->dev);
-       pm_runtime_idle(imx355->dev);
 
        ret = v4l2_async_register_subdev_sensor(&imx355->sd);
        if (ret < 0)
                goto error_media_entity_runtime_pm;
 
+       pm_runtime_idle(imx355->dev);
+
        return 0;
 
 error_media_entity_runtime_pm:
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to