mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
rtc: mrst: fix error code in probe()
We should be returning "retval". The "mrst_rtc.rtc" variable is a valid
pointer.
Fixes: 32b41f93dc
("rtc: mrst: switch to devm functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
ce397d215c
commit
ca95ef7c98
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user