From: Simon Horman <horms@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Henry Martin <bsdhenrymartin@gmail.com>,
netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Michael Grzeschik <m.grzeschik@pengutronix.de>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH v2] arcnet: Add NULL check in com20020pci_probe()
Date: Wed, 2 Apr 2025 10:07:51 +0100 [thread overview]
Message-ID: <20250402090751.GH214849@horms.kernel.org> (raw)
In-Reply-To: <f85c219e-2463-4d59-84d4-5807bbcb1a41@web.de>
On Tue, Apr 01, 2025 at 05:37:18PM +0200, Markus Elfring wrote:
> > devm_kasprintf() return NULL if memory allocation fails. Currently,
> …
> call? failed?
>
>
> > Add NULL check after devm_kasprintf() to prevent this issue.
>
> Please complete also the corresponding exception handling.
>
> Source code example for further inspiration:
> https://elixir.bootlin.com/linux/v6.14-rc6/source/drivers/net/arcnet/com20020-pci.c#L239-L244
>
> Thus I suggest to use another label like “e_nomem” for this purpose.
Ok, but surely the err_free_arcdev label can be reused for this purpose.
next prev parent reply other threads:[~2025-04-02 9:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 14:53 [PATCH v2] arcnet: Add NULL check in com20020pci_probe() Henry Martin
2025-04-01 15:37 ` Markus Elfring
2025-04-02 9:07 ` Simon Horman [this message]
2025-04-02 13:50 ` [PATCH v3] " Henry Martin
2025-04-02 18:46 ` Markus Elfring
2025-04-04 14:40 ` patchwork-bot+netdevbpf
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=20250402090751.GH214849@horms.kernel.org \
--to=horms@kernel.org \
--cc=Markus.Elfring@web.de \
--cc=andrew+netdev@lunn.ch \
--cc=bsdhenrymartin@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).