diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-06-07 10:29:09 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-06-07 20:11:08 +0200 |
commit | e4302aec8a0646828a701443e303eb5ef48b37f5 (patch) | |
tree | fca0319e92d3151a844789319d6c51dacfb9acbf /drivers/rtc | |
parent | rtc: cros-ec: Switch to SPDX identifier. (diff) | |
download | linux-e4302aec8a0646828a701443e303eb5ef48b37f5.tar.xz linux-e4302aec8a0646828a701443e303eb5ef48b37f5.zip |
rtc: pxa: fix probe function
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |