Skip to contentSkip to conversation

iio:imu:adis16400 remove an unneeded check

PATCH Applied Dan Carpenter 3 participants 3 messages Jan 30, 2014 – Feb 3, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio:imu:adis16400 remove an unneeded check

We know "ret" is zero here so there is no need to check.

drivers/iio/imu/adis16400_core.c +1 -1
index 368660dfe135..411586f49dae 100644
@@ -281,7 +281,7 @@ static ssize_t adis16400_write_frequency(struct device *dev,
 	st->variant->set_freq(st, val);
 	mutex_unlock(&indio_dev->mlock);
 
-	return ret ? ret : len;
+	return len;
 }
 
 /* Power down the device */
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dan Carpenter

We know "ret" is zero here so there is no need to check.

Thanks.

Quoted 15 lines
drivers/iio/imu/adis16400_core.c +1 -1
index 368660dfe135..411586f49dae 100644
@@ -281,7 +281,7 @@ static ssize_t adis16400_write_frequency(struct device *dev,
 	st->variant->set_freq(st, val);
 	mutex_unlock(&indio_dev->mlock);
 
-	return ret ? ret : len;
+	return len;
 }
 
 /* Power down the device */
maintainer Applied
#2 lore raw
Quoted 6 lines · Lars-Peter Clausen
Quoted 3 lines · Dan Carpenter

We know "ret" is zero here so there is no need to check.

Applied to the togreg branch of iio.git

Thanks,

Quoted 19 lines

Thanks.

Quoted 15 lines
drivers/iio/imu/adis16400_core.c +1 -1
index 368660dfe135..411586f49dae 100644
@@ -281,7 +281,7 @@ static ssize_t adis16400_write_frequency(struct device *dev,
  	st->variant->set_freq(st, val);
  	mutex_unlock(&indio_dev->mlock);
 
-	return ret ? ret : len;
+	return len;
  }
 
  /* Power down the device */