From: henry via Bugspray Bot <bugbot@kernel.org>
To: linux-gpio@vger.kernel.org
Subject: Missing null check in rza2_gpio_register
Date: Fri, 28 Mar 2025 10:15:06 +0000 [thread overview]
Message-ID: <20250328-b219946c0-f69b453deb65@bugzilla.kernel.org> (raw)
henry writes via Kernel.org Bugzilla:
pinctrl: renesas: rza2: Add null check in the rza2_gpio_register
When devm_kasprintf fails, it returns a null pointer. However, this return value is not properly checked in the function rza2_gpio_register.
A check should be added after the devm_kasprintf call to prevent potential null pointer dereference issues.
CODE:
chip.label = devm_kasprintf(priv->dev, GFP_KERNEL, "%pOFn", np);
chip.parent = priv->dev;
chip.ngpio = priv->npins;
View: https://bugzilla.kernel.org/show_bug.cgi?id=219946#c0
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
next reply other threads:[~2025-03-28 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 10:15 henry via Bugspray Bot [this message]
2025-04-27 9:05 ` Missing null check in rza2_gpio_register Andy Shevchenko via Bugspray Bot
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=20250328-b219946c0-f69b453deb65@bugzilla.kernel.org \
--to=bugbot@kernel.org \
--cc=linux-gpio@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 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.