From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6.y 2/2] media: imx355: Avoid calling imx355_power_off twice in error path
Date: Fri, 11 Sep 2026 08:47:00 -0400 [thread overview]
Message-ID: <20260911124700.642910-2-sashal@kernel.org> (raw)
In-Reply-To: <20260911124700.642910-1-sashal@kernel.org>
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
[ Upstream commit ee737bc3ccae7dc713ccaa83ffa46080c6031b3e ]
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: stable@vger.kernel.org
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 e3758e3d78032..a3703336468c6 100644
--- a/drivers/media/i2c/imx355.c
+++ b/drivers/media/i2c/imx355.c
@@ -1792,12 +1792,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:
--
2.53.0
prev parent reply other threads:[~2026-09-11 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 10:46 FAILED: patch "[PATCH] media: imx355: Avoid calling imx355_power_off twice in error" failed to apply to 6.6-stable tree gregkh
2026-09-11 12:46 ` [PATCH 6.6.y 1/2] media: i2c: imx355: Replace client->dev usage Sasha Levin
2026-09-11 12:47 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260911124700.642910-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox