From: Dan Carpenter <dan.carpenter@linaro.org>
To: Andrea della Porta <andrea.porta@suse.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] pinctrl: rp1: silence uninitialized variable warning
Date: Mon, 30 Jun 2025 14:35:09 -0500 [thread overview]
Message-ID: <748d256a-dc9d-4f85-aaa4-d480b7c4fd22@sabinyo.mountain> (raw)
This default path could probably can't be reached but Smatch can't
verify it so it complains that "arg" isn't initialized on this path.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
I didn't add a Fixes tag because this likely isn't a real bug. Plus this
code is very new so it doesn't need to be backported anyway.
Also checkpatch complains:
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
But I left it that way so it's consistent with the other return in
the function. Maybe we should change both?
drivers/pinctrl/pinctrl-rp1.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-rp1.c b/drivers/pinctrl/pinctrl-rp1.c
index d300f28c52cd..f9cc6b28994c 100644
--- a/drivers/pinctrl/pinctrl-rp1.c
+++ b/drivers/pinctrl/pinctrl-rp1.c
@@ -1524,6 +1524,8 @@ static int rp1_pinconf_get(struct pinctrl_dev *pctldev, unsigned int offset,
case RP1_PAD_DRIVE_12MA:
arg = 12;
break;
+ default:
+ return -ENOTSUPP;
}
break;
case PIN_CONFIG_BIAS_DISABLE:
--
2.47.2
next reply other threads:[~2025-06-30 19:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 19:35 Dan Carpenter [this message]
2025-07-01 9:30 ` Andrea della Porta
2025-07-01 19:04 ` Dan Carpenter
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=748d256a-dc9d-4f85-aaa4-d480b7c4fd22@sabinyo.mountain \
--to=dan.carpenter@linaro.org \
--cc=andrea.porta@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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®