Re: [PATCH v2] rtc: mc13xxx: fix a double-unlock issue
From: Alexandre Belloni
Date: Mon May 11 2020 - 10:23:48 EST
On 03/05/2020 13:22:35-0500, wu000273@xxxxxxx wrote:
> From: Qiushi Wu <wu000273@xxxxxxx>
>
> 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@xxxxxxx>
> ---
> 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