rtc: rv8803: fix missing unlock on error in rv8803_set_time()
Add the missing unlock before return from function rv8803_set_time()
in the error handling case.
Fixes: f8176e0bb8
("rtc: rv8803: initialize registers on post-probe voltage loss")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220627080822.3881072-1-yangyingliang@huawei.com
This commit is contained in:
parent
07dcc6f9c7
commit
bb42b7e9e3
|
@ -315,8 +315,10 @@ static int rv8803_set_time(struct device *dev, struct rtc_time *tm)
|
|||
|
||||
if (flags & RV8803_FLAG_V2F) {
|
||||
ret = rv8803_regs_reset(rv8803);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
mutex_unlock(&rv8803->flags_lock);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = rv8803_write_reg(rv8803->client, RV8803_FLAG,
|
||||
|
|
Loading…
Reference in New Issue