Message ID | 20241030160756.2099326-3-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | iio: acpi: always initialise data in iio_get_acpi_device_name_and_data() | expand |
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 28ed0e09d099..3d24d4fb6621 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -1507,8 +1507,7 @@ static int kxcjk1013_probe(struct i2c_client *client) data->info = (const struct kx_chipset_info *)(id->driver_data); } else { name = iio_get_acpi_device_name_and_data(&client->dev, &ddata); - if (name) - data->info = ddata; + data->info = ddata; if (data->info == &kxcj91008_kiox010a_info) indio_dev->label = "accel-display"; else if (data->info == &kxcj91008_kiox020a_info)
Since iio_get_acpi_device_name_and_data() always initialises data, if provided, there is no need to have this check in the caller. Drop it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/iio/accel/kxcjk-1013.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)