Re: [PATCH v2 3/4] iio: accel: kxcjk-1013: Assing ddata to NULL instead of NULL check

From: Markus Elfring
Date: Fri Nov 01 2024 - 10:46:19 EST


> When iio_get_acpi_device_name_and_data() fails, the ddata may be left
> uninitialised. Initialise it to NULL and drop unneeded NULL check
> in kxcjk1013_probe()

I propose to reduce the scope for this local variable.


How do you think about to use a summary phrase like “Replace a pointer check
by a variable initialisation in kxcjk1013_probe()” instead?

Regards,
Markus