提交 615d23f8 编写于 作者: S Shubhrajyoti Datta 提交者: Linus Walleij

gpio: zynq: Fix the error path

pm_runtime_disable is called only in remove it is missed
out in the error path.
Fix the same.
Signed-off-by: NShubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 bd37c999
......@@ -713,7 +713,7 @@ static int zynq_gpio_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0)
return ret;
goto err_pm_dis;
/* report a bug if gpio chip registration fails */
ret = gpiochip_add_data(chip, gpio);
......@@ -745,6 +745,8 @@ static int zynq_gpio_probe(struct platform_device *pdev)
gpiochip_remove(chip);
err_pm_put:
pm_runtime_put(&pdev->dev);
err_pm_dis:
pm_runtime_disable(&pdev->dev);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册