Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4302aec authored by Dan Carpenter's avatar Dan Carpenter Committed by Alexandre Belloni
Browse files

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: 3cdf4ad9 ("rtc: pxa: convert to use shared sa1100 functions")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 8ee4aee5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}