Skip to content

Commit e4302ae

Browse files
Dan Carpenteralexandrebelloni
authored andcommitted
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: 3cdf4ad ("rtc: pxa: convert to use shared sa1100 functions") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 8ee4aee commit e4302ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-pxa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)
363363
sa1100_rtc->rtar = pxa_rtc->base + 0x4;
364364
sa1100_rtc->rttr = pxa_rtc->base + 0xc;
365365
ret = sa1100_rtc_init(pdev, sa1100_rtc);
366-
if (!ret) {
366+
if (ret) {
367367
dev_err(dev, "Unable to init SA1100 RTC sub-device\n");
368368
return ret;
369369
}

0 commit comments

Comments
 (0)