Skip to content

Commit

Permalink
rtc: pxa: fix probe function
Browse files Browse the repository at this point in the history
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: 3cdf4ad ("rtc: pxa: convert to use shared sa1100 functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
  • Loading branch information
Dan Carpenter authored and Alexandre Belloni committed Jun 7, 2018
1 parent 8ee4aee commit e4302ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e4302ae

Please sign in to comment.