mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 23:51:02 +02:00
pmdomain: rockchip: fix clock leak on domain probe failure
When of_clk_get() failed in the middle of the loop, the references of
the clocks acquired so far were leaked instead of being released by
the error path.
Fixes: d909072d05 ("soc: rockchip: power-domain: use clk_bulk APIs")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
This commit is contained in:
parent
4c0d69d677
commit
d8b3847770
|
|
@ -842,7 +842,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
|||
dev_err(pmu->dev,
|
||||
"%pOFn: failed to get clk at index %d: %d\n",
|
||||
node, i, error);
|
||||
return error;
|
||||
goto err_put_clocks;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user