From: Markus Elfring <Markus.Elfring@web.de>
To: "Charles Han" <hanchunchao@inspur.com>,
linux-iio@vger.kernel.org,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"Jonathan Cameron" <jic23@kernel.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>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: adc: ti-ads1298: Add NULL check in ads1298_init()
Date: Mon, 18 Nov 2024 11:08:47 +0100 [thread overview]
Message-ID: <ba5e2b95-12d9-490b-b58d-131dedba6446@web.de> (raw)
In-Reply-To: <20241118090208.14586-1-hanchunchao@inspur.com>
> 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
next prev parent reply other threads:[~2024-11-18 10:10 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 ` Markus Elfring [this message]
2024-11-24 17:54 ` [PATCH] iio: adc: ti-ads1298: Add NULL check in ads1298_init() Jonathan Cameron
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=ba5e2b95-12d9-490b-b58d-131dedba6446@web.de \
--to=markus.elfring@web.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=hanchunchao@inspur.com \
--cc=jic23@kernel.org \
--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