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: d5f281f3dd ("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>
This commit is contained in:
David Carlier 2026-07-03 17:35:03 +01:00 committed by Hans Verkuil
parent 876006e994
commit f499befeb6

View File

@ -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;
}