From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>
Cc: <alexandre.belloni@bootlin.com>, <a.zummo@towertech.it>,
<s.hauer@pengutronix.de>, <a.fatoum@pengutronix.de>
Subject: [PATCH -next] rtc: rv8803: fix missing unlock on error in rv8803_set_time()
Date: Mon, 27 Jun 2022 15:35:49 +0800 [thread overview]
Message-ID: <20220627073549.3976620-1-yangyingliang@huawei.com> (raw)
Add the missing unlock before return from function rv8803_set_time()
in the error handling case.
Fixes: c27fee16fab1 ("rtc: rv8803: re-initialize all Epson RX8803 registers on voltage loss")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/rtc/rtc-rv8803.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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,
--
2.25.1
next reply other threads:[~2022-06-27 7:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 7:35 Yang Yingliang [this message]
2022-06-27 7:37 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220627073549.3976620-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=a.fatoum@pengutronix.de \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®