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@xxxxxxxxxxxxxxx> --- drivers/iio/accel/kxcjk-1013.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) -- 2.43.0.rc1.1336.g36b5255a03ac