From: Markus Elfring <Markus.Elfring@web.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-iio@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v2 1/4] iio: light: ltr501: Assing ddata to NULL
Date: Fri, 1 Nov 2024 13:43:06 +0100 [thread overview]
Message-ID: <8c7a5bcc-1fdb-45af-8f0c-1f9b6f0cf058@web.de> (raw)
In-Reply-To: <20241101081203.3360421-2-andriy.shevchenko@linux.intel.com>
> When iio_get_acpi_device_name_and_data() fails, the ddata may be left
> uninitialised. Initialise it to NULL.
How do you think about to perform the variable assignment only in
a corresponding else branch?
Can it be that this adjustment does not really matter here because of
the following statement?
if (!name)
return -ENODEV;
Regards,
Markus
next prev parent reply other threads:[~2024-11-01 12:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 8:08 [PATCH v2 0/4] iio: initialise ddata for iio_get_acpi_device_name_and_data() Andy Shevchenko
2024-11-01 8:08 ` [PATCH v2 1/4] iio: light: ltr501: Assing ddata to NULL Andy Shevchenko
2024-11-01 10:56 ` Markus Elfring
2024-11-01 12:43 ` Markus Elfring [this message]
2024-11-01 8:08 ` [PATCH v2 2/4] iio: light: isl29018: " Andy Shevchenko
2024-11-01 14:27 ` Markus Elfring
2024-11-01 8:08 ` [PATCH v2 3/4] iio: accel: kxcjk-1013: Assing ddata to NULL instead of NULL check Andy Shevchenko
2024-11-01 14:45 ` Markus Elfring
2024-11-01 8:08 ` [PATCH v2 4/4] iio: accel: kxcjk-1013: Deduplicate ODR startup time array Andy Shevchenko
2024-11-01 14:56 ` [PATCH v2 0/4] iio: initialise ddata for iio_get_acpi_device_name_and_data() 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=8c7a5bcc-1fdb-45af-8f0c-1f9b6f0cf058@web.de \
--to=markus.elfring@web.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@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