]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drivers: iio: accel: Use warning if invalid device id is detected
authorRamona Bolboaca <ramona.bolboaca@analog.com>
Mon, 31 Oct 2022 10:51:27 +0000 (12:51 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:04 +0000 (19:44 +0000)
Use warning instead of failing driver probe if invalid device id is
detected for ADXL355 device.

Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Link: https://lore.kernel.org/r/20221031105129.47740-2-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl355_core.c

index 4bc648eac8b29afbeb651c3c80dfd25b31d35fe6..dd08253d66d060a10b731d0d2b19faf2532c5229 100644 (file)
@@ -262,10 +262,8 @@ static int adxl355_setup(struct adxl355_data *data)
        if (ret)
                return ret;
 
-       if (regval != ADXL355_PARTID_VAL) {
-               dev_err(data->dev, "Invalid DEV ID 0x%02x\n", regval);
-               return -ENODEV;
-       }
+       if (regval != ADXL355_PARTID_VAL)
+               dev_warn(data->dev, "Invalid DEV ID 0x%02x\n", regval);
 
        /*
         * Perform a software reset to make sure the device is in a consistent