summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2026-07-03 17:35:03 +0100
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-07-28 11:36:46 +0200
commitf499befeb668436b67bdb2b610b34db57732703f (patch)
tree536f402e3dcf4ebb8829a0658c77a464991aa3dd /drivers/media
parent876006e994c4ac8f2af553364b5a2282d6dee9ab (diff)
downloadlinux-next-f499befeb668436b67bdb2b610b34db57732703f.tar.gz
linux-next-f499befeb668436b67bdb2b610b34db57732703f.zip
media: mali-c55: Fix clock leak on reset deassert failure
__mali_c55_power_on() enables the clocks before deasserting the resets, but bails out on a deassert failure without disabling them again. Both callers treat a failed power-on as already cleaned up, so the clocks are left enabled. Disable them on the error path. Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver") Cc: stable@vger.kernel.org Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/arm/mali-c55/mali-c55-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
index ee4a4267415e..fb81141d1653 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
@@ -699,6 +699,8 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
mali_c55->resets);
if (ret) {
dev_err(mali_c55->dev, "failed to deassert resets\n");
+ clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks),
+ mali_c55->clks);
return ret;
}