From: sashiko-bot@kernel.org
To: "Liu Dalin" <liudalin@kylinsec.com.cn>
Cc: linux-rtc@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] rtc: rs5c372: add missing error code for unknown RTC type
Date: Thu, 27 Aug 2026 02:03:19 +0000 [thread overview]
Message-ID: <20260827020320.1AA361F000E9@smtp.kernel.org> (raw)
In-Reply-To: <C18300C5767FC690+20260827015846.3314353-1-liudalin@kylinsec.com.cn>
> In rs5c372_probe(), when an unknown RTC type is encountered in the
> switch default case, the local variable 'err' is still 0 from its
> initialization. The subsequent goto to the exit label then returns
> success, even though probe has failed.
>
> Set err = -ENODEV before jumping to exit to properly report the
> failure to the caller.
>
> Fixes smatch warnings:
> - drivers/rtc/rtc-rs5c372.c:860 rs5c372_probe() warn: missing error
> code 'err'
>
> Fixes: cb26b572dc394 ("[PATCH] Update the rtc-rs5c372 driver")
> Assisted-by: smatch:2.0 [static analysis]
> Signed-off-by: Liu Dalin <liudalin@kylinsec.com.cn>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/C18300C5767FC690+20260827015846.3314353-1-liudalin@kylinsec.com.cn?part=1
next prev parent reply other threads:[~2026-08-27 2:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 1:58 [PATCH] rtc: rs5c372: add missing error code for unknown RTC type Liu Dalin
2026-08-27 2:03 ` sashiko-bot [this message]
2026-09-29 21:48 ` Alexandre Belloni
2026-09-30 1:07 ` liudalin
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=20260827020320.1AA361F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.kernel.org \
--cc=liudalin@kylinsec.com.cn \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.