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:
Родитель
ce397d215c
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче