From: Vasileios Amoiridis Date: Wed, 8 May 2024 16:51:59 +0000 (+0200) Subject: iio: pressure: bmp280: Remove dead error checks X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=081cea88a61a33c17d86270390a88b2e71c25475;p=linux.git iio: pressure: bmp280: Remove dead error checks 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 Link: https://lore.kernel.org/r/20240508165207.145554-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index ed49e0779d41..311a011604da 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -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,