rtc: sunplus: fix return value in sp_rtc_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 6 Jan 2022 07:57:11 +0000 (15:57 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 16 Jan 2022 22:50:34 +0000 (23:50 +0100)
commit5ceee540fdc7f1d65ca6e2b1b193ce5aa95ab99c
tree7c25b3d731341cbc0c00aebcb75710fc46349f55
parentff164ae39b82ee483b24579c8e22a13a8ce5bd04
rtc: sunplus: fix return value in sp_rtc_probe()

If devm_ioremap_resource() fails, it should return error
code from sp_rtc->reg_base in sp_rtc_probe().

Fixes: fad6cbe9b2b4 ("rtc: Add driver for RTC in Sunplus SP7021")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220106075711.3216468-1-yangyingliang@huawei.com
drivers/rtc/rtc-sunplus.c