Re: [PATCH v2 1/4] iio: light: ltr501: Assing ddata to NULL

From: Markus Elfring
Date: Fri Nov 01 2024 - 08:49:01 EST


> 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