iio: pressure: bmp280: Remove dead error checks
authorVasileios Amoiridis <vassilisamir@gmail.com>
Wed, 8 May 2024 16:51:59 +0000 (18:51 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 27 May 2024 08:48:57 +0000 (09:48 +0100)
The ret value is being checked already in all the previous
paths which exit in case of error, so this path can never
become true.

Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://lore.kernel.org/r/20240508165207.145554-2-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/bmp280-core.c

index ed49e0779d417b8d7c648c33f7f4ffd8f9f613e9..311a011604daba60a4c058890d076d3066b77df1 100644 (file)
@@ -1350,10 +1350,6 @@ static int bmp580_nvm_operation(struct bmp280_data *data, bool is_write)
                poll = 50;
                timeout = 400;
        }
-       if (ret) {
-               dev_err(data->dev, "failed to write command sequence\n");
-               return -EIO;
-       }
 
        /* Wait until NVM is ready again */
        ret = regmap_read_poll_timeout(data->regmap, BMP580_REG_STATUS, reg,