Commit 7eebc934 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Greg Kroah-Hartman

rtc: omap: fix error path when pinctrl_register fails

commit 26e480f7 upstream.

If pinctrl_register() fails probe will return with an error without locking
the RTC and disabling pm_runtime.
Set ret and jump to err instead.

Fixes: 97ea1906 ("rtc: omap: Support ext_wakeup configuration")
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 31a67370
...@@ -823,7 +823,8 @@ static int omap_rtc_probe(struct platform_device *pdev) ...@@ -823,7 +823,8 @@ static int omap_rtc_probe(struct platform_device *pdev)
rtc->pctldev = pinctrl_register(&rtc_pinctrl_desc, &pdev->dev, rtc); rtc->pctldev = pinctrl_register(&rtc_pinctrl_desc, &pdev->dev, rtc);
if (IS_ERR(rtc->pctldev)) { if (IS_ERR(rtc->pctldev)) {
dev_err(&pdev->dev, "Couldn't register pinctrl driver\n"); dev_err(&pdev->dev, "Couldn't register pinctrl driver\n");
return PTR_ERR(rtc->pctldev); ret = PTR_ERR(rtc->pctldev);
goto err;
} }
if (rtc->is_pmic_controller) { if (rtc->is_pmic_controller) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment