mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
pwm: rockchip: release clk if pinctrl check failed
Fixes: 718c02ce18 ("pwm: rockchip: Make pwm pinctrl setting after pwm enabled")
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ic67407ee416a24ba368c3cff21aefde0ddf63700
This commit is contained in:
@@ -395,13 +395,15 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
|
||||
pc->pinctrl = devm_pinctrl_get(&pdev->dev);
|
||||
if (IS_ERR(pc->pinctrl)) {
|
||||
dev_err(&pdev->dev, "Get pinctrl failed!\n");
|
||||
return PTR_ERR(pc->pinctrl);
|
||||
ret = PTR_ERR(pc->pinctrl);
|
||||
goto err_pclk;
|
||||
}
|
||||
|
||||
pc->active_state = pinctrl_lookup_state(pc->pinctrl, "active");
|
||||
if (IS_ERR(pc->active_state)) {
|
||||
dev_err(&pdev->dev, "No active pinctrl state\n");
|
||||
return PTR_ERR(pc->active_state);
|
||||
ret = PTR_ERR(pc->active_state);
|
||||
goto err_pclk;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, pc);
|
||||
|
||||
Reference in New Issue
Block a user