From: Jonathan Cameron <jic23@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: "Charles Han" <hanchunchao@inspur.com>,
linux-iio@vger.kernel.org,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Nuno Sá" <nuno.sa@analog.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Yu Jiaoliang" <yujiaoliang@vivo.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: adc: ti-ads1298: Add NULL check in ads1298_init()
Date: Sun, 24 Nov 2024 17:54:23 +0000 [thread overview]
Message-ID: <20241124175423.5ee15c6a@jic23-huawei> (raw)
In-Reply-To: <ba5e2b95-12d9-490b-b58d-131dedba6446@web.de>
On Mon, 18 Nov 2024 11:08:47 +0100
Markus Elfring <Markus.Elfring@web.de> wrote:
> > devm_kasprintf() can return a NULL pointer on failure,but this
> > returned value in ads1298_init() is not checked.
> > Add NULL check in ads1298_init(), to handle kernel NULL
> > pointer dereference error.
>
> Another wording suggestion:
> A devm_kasprintf() call can return a null pointer on failure.
> But such a return value was not checked in this function implementation.
> Thus add a corresponding check so that a null pointer dereference
> will be avoided.
>
>
> Regards,
> Markus
I tweaked it to slightly shorter form.
Applied and marked for stable.
Thanks,
Jonathan
prev parent reply other threads:[~2024-11-24 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 9:02 [PATCH] iio: adc: ti-ads1298: Add NULL check in ads1298_init Charles Han
2024-11-18 10:08 ` [PATCH] iio: adc: ti-ads1298: Add NULL check in ads1298_init() Markus Elfring
2024-11-24 17:54 ` Jonathan Cameron [this message]
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=20241124175423.5ee15c6a@jic23-huawei \
--to=jic23@kernel.org \
--cc=Markus.Elfring@web.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=hanchunchao@inspur.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
--cc=nuno.sa@analog.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yujiaoliang@vivo.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