Skip to contentSkip to conversation

iio: dac: ad7303: 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: dac: ad7303: remove an unneeded check

"ret" is zero here. There is no need to check again.

drivers/iio/dac/ad7303.c +1 -1
index d0505fd22ef4..fa2810032968 100644
@@ -92,7 +92,7 @@ static ssize_t ad7303_write_dac_powerdown(struct iio_dev *indio_dev,
 	ad7303_write(st, chan->channel, st->dac_cache[chan->channel]);
 
 	mutex_unlock(&indio_dev->mlock);
-	return ret ? ret : len;
+	return len;
 }
 
 static int ad7303_get_vref(struct ad7303_state *st,
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dan Carpenter

"ret" is zero here. There is no need to check again.

Thanks.

Quoted 15 lines
drivers/iio/dac/ad7303.c +1 -1
index d0505fd22ef4..fa2810032968 100644
@@ -92,7 +92,7 @@ static ssize_t ad7303_write_dac_powerdown(struct iio_dev *indio_dev,
 	ad7303_write(st, chan->channel, st->dac_cache[chan->channel]);
 
 	mutex_unlock(&indio_dev->mlock);
-	return ret ? ret : len;
+	return len;
 }
 
 static int ad7303_get_vref(struct ad7303_state *st,
maintainer Applied
#2 lore raw
Quoted 6 lines · Lars-Peter Clausen
Quoted 3 lines · Dan Carpenter

"ret" is zero here. There is no need to check again.

Applied to the togreg branch of iio.git

Thanks,

Quoted 19 lines

Thanks.

Quoted 15 lines
drivers/iio/dac/ad7303.c +1 -1
index d0505fd22ef4..fa2810032968 100644
@@ -92,7 +92,7 @@ static ssize_t ad7303_write_dac_powerdown(struct iio_dev *indio_dev,
  	ad7303_write(st, chan->channel, st->dac_cache[chan->channel]);
 
  	mutex_unlock(&indio_dev->mlock);
-	return ret ? ret : len;
+	return len;
  }
 
  static int ad7303_get_vref(struct ad7303_state *st,