Skip to content

Commit

Permalink
rtc: mrst: fix error code in probe()
Browse files Browse the repository at this point in the history
We should be returning "retval".  The "mrst_rtc.rtc" variable is a valid
pointer.

Fixes: 32b41f9 ("rtc: mrst: switch to devm 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 20, 2018
1 parent ce397d2 commit ca95ef7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/rtc/rtc-mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ca95ef7

Please sign in to comment.