* [PATCH] rtc: mrst: fix error code in probe()
@ 2018-06-12 12:03 Dan Carpenter
2018-06-20 10:44 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-06-12 12:03 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, kernel-janitors
We should be returning "retval". The "mrst_rtc.rtc" variable is a valid
pointer.
Fixes: 32b41f93dcaf ("rtc: mrst: switch to devm functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 097a4d4e2aba..1925aaf09093 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -367,10 +367,8 @@ static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,
}
retval = rtc_register_device(mrst_rtc.rtc);
- if (retval) {
- retval = PTR_ERR(mrst_rtc.rtc);
+ if (retval)
goto cleanup0;
- }
dev_dbg(dev, "initialised\n");
return 0;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: mrst: fix error code in probe()
2018-06-12 12:03 [PATCH] rtc: mrst: fix error code in probe() Dan Carpenter
@ 2018-06-20 10:44 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2018-06-20 10:44 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Alessandro Zummo, linux-rtc, kernel-janitors
On 12/06/2018 15:03:02+0300, Dan Carpenter wrote:
> We should be returning "retval". The "mrst_rtc.rtc" variable is a valid
> pointer.
>
> Fixes: 32b41f93dcaf ("rtc: mrst: switch to devm functions")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Applied, thanks.
--
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-20 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-12 12:03 [PATCH] rtc: mrst: fix error code in probe() Dan Carpenter
2018-06-20 10:44 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).