pwm: rockchip: release clk if pinctrl check failed
Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Change-Id: Ic67407ee416a24ba368c3cff21aefde0ddf63700
This commit is contained in:
@ -411,13 +411,15 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
|
|||||||
pc->pinctrl = devm_pinctrl_get(&pdev->dev);
|
pc->pinctrl = devm_pinctrl_get(&pdev->dev);
|
||||||
if (IS_ERR(pc->pinctrl)) {
|
if (IS_ERR(pc->pinctrl)) {
|
||||||
dev_err(&pdev->dev, "Get pinctrl failed!\n");
|
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");
|
pc->active_state = pinctrl_lookup_state(pc->pinctrl, "active");
|
||||||
if (IS_ERR(pc->active_state)) {
|
if (IS_ERR(pc->active_state)) {
|
||||||
dev_err(&pdev->dev, "No active pinctrl state\n");
|
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);
|
platform_set_drvdata(pdev, pc);
|
||||||
|
|||||||
Reference in New Issue
Block a user