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

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

rtc: mrst: fix error code in probe()



We should be returning "retval".  The "mrst_rtc.rtc" variable is a valid
pointer.

Fixes: 32b41f93 ("rtc: mrst: switch to devm functions")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent ce397d21
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -367,10 +367,8 @@ static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,
	}

	retval = rtc_register_device(mrst_rtc.rtc);
	if (retval) {
		retval = PTR_ERR(mrst_rtc.rtc);
	if (retval)
		goto cleanup0;
	}

	dev_dbg(dev, "initialised\n");
	return 0;