aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-rv8803.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
index fe1247e771b9..3527a0521e9b 100644
--- a/drivers/rtc/rtc-rv8803.c
+++ b/drivers/rtc/rtc-rv8803.c
@@ -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,