gpio: rockchip: release clk correctly when error

Fixes: 7b561549e4 ("gpio: rockchip: binding thread to specified cpu")
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I6e1828400c1d11c8fafdb33561c5673e6efcf934
This commit is contained in:
Ye Zhang
2025-03-10 18:17:45 +08:00
committed by Tao Huang
parent 0a07eff3f1
commit af693b7322

View File

@@ -1140,7 +1140,7 @@ static int rockchip_gpio_probe(struct platform_device *pdev)
ret = rockchip_gpio_parse_irqs(pdev, bank);
if (ret < 0)
return ret;
goto err_clk;
rockchip_gpio_init_cpuhp();
/*
@@ -1213,6 +1213,7 @@ err_unlock:
rockchip_gpio_remove_cpuhp();
mutex_unlock(&bank->deferred_lock);
err_clk:
clk_disable_unprepare(bank->clk);
clk_disable_unprepare(bank->db_clk);