Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26e480f7 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: omap: fix error path when pinctrl_register fails



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>
parent 3ba2c76a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -830,7 +830,8 @@ static int omap_rtc_probe(struct platform_device *pdev)
	rtc->pctldev = pinctrl_register(&rtc_pinctrl_desc, &pdev->dev, rtc);
	if (IS_ERR(rtc->pctldev)) {
		dev_err(&pdev->dev, "Couldn't register pinctrl driver\n");
		return PTR_ERR(rtc->pctldev);
		ret = PTR_ERR(rtc->pctldev);
		goto err;
	}

	return 0;