linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: wu000273@umn.edu
Cc: a.zummo@towertech.it, Markus.Elfring@web.de,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	kjlu@umn.edu
Subject: Re: [PATCH v2] rtc: mc13xxx: fix a double-unlock issue
Date: Mon, 11 May 2020 16:23:44 +0200	[thread overview]
Message-ID: <20200511142344.GR34497@piout.net> (raw)
In-Reply-To: <20200503182235.1652-1-wu000273@umn.edu>

On 03/05/2020 13:22:35-0500, wu000273@umn.edu wrote:
> From: Qiushi Wu <wu000273@umn.edu>
> 
> In function mc13xxx_rtc_probe, the mc13xxx_unlock() is called
> before rtc_register_device(). But in the error path of
> rtc_register_device(), the mc13xxx_unlock() is called again,
> which causes a double-unlock problem. Thus add a call of the
> function “mc13xxx_lock” in an if branch for the completion
> of the exception handling.
> 
> Fixes: e4ae7023e182a ("rtc: mc13xxx: set range")
> Signed-off-by: Qiushi Wu <wu000273@umn.edu>
> ---
>  drivers/rtc/rtc-mc13xxx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2020-05-11 14:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 18:22 wu000273
2020-05-11 14:23 ` Alexandre Belloni [this message]

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=20200511142344.GR34497@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=Markus.Elfring@web.de \
    --cc=a.zummo@towertech.it \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=wu000273@umn.edu \
    --subject='Re: [PATCH v2] rtc: mc13xxx: fix a double-unlock issue' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).