[PATCH 1/9] iio: pressure: bmp280: Remove dead error checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/iio/pressure/bmp280-core.c | 4 ----
 1 file changed, 4 deletions(-)

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,

base-commit: dccb07f2914cdab2ac3a5b6c98406f765acab803
prerequisite-patch-id: 97b99b1106cbfd65cef8d256e4dc1a3a9257511e
prerequisite-patch-id: c60e8ef6fae62417c3430b7598b1a3d2a551be79
prerequisite-patch-id: 6a49484a6d154ddcd1b45b71a6be2c3542ae0be6
prerequisite-patch-id: 5aae62fa92c719fb65a8701ec4e1c4284bef7fd9
prerequisite-patch-id: 6943297d5f70f74bfcf5d5b26198423e428773d9
-- 
2.25.1





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux