* [PATCH] rtc: pxa: fix probe function
@ 2018-06-07 8:29 Dan Carpenter
2018-06-07 18:11 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-06-07 8:29 UTC (permalink / raw)
To: Alessandro Zummo, Rob Herring
Cc: Alexandre Belloni, linux-rtc, kernel-janitors
This patch is from static analysis and I don't have the hardware to
to test it. I think the test is reversed so now the probe function
will return success early and the last part of the function is dead
code.
Fixes: 3cdf4ad9633e ("rtc: pxa: convert to use shared sa1100 functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index 47304f5664d8..e1887b86fdc7 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -363,7 +363,7 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)
sa1100_rtc->rtar = pxa_rtc->base + 0x4;
sa1100_rtc->rttr = pxa_rtc->base + 0xc;
ret = sa1100_rtc_init(pdev, sa1100_rtc);
- if (!ret) {
+ if (ret) {
dev_err(dev, "Unable to init SA1100 RTC sub-device\n");
return ret;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: pxa: fix probe function
2018-06-07 8:29 [PATCH] rtc: pxa: fix probe function Dan Carpenter
@ 2018-06-07 18:11 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2018-06-07 18:11 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Alessandro Zummo, Rob Herring, linux-rtc, kernel-janitors
On 07/06/2018 11:29:09+0300, Dan Carpenter wrote:
> This patch is from static analysis and I don't have the hardware to
> to test it. I think the test is reversed so now the probe function
> will return success early and the last part of the function is dead
> code.
>
> Fixes: 3cdf4ad9633e ("rtc: pxa: convert to use shared sa1100 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-07 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-07 8:29 [PATCH] rtc: pxa: fix probe function Dan Carpenter
2018-06-07 18:11 ` 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).