From da96aecdc59d086926d49becd981acab8d98bb9a Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Thu, 25 Sep 2014 16:09:57 +0530 Subject: [PATCH] Staging: iio: Remove unnecessory immediate else after return statement This patch fixes following checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: Vaishali Thakkar Acked-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/adc/ad7816.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c index d83b3fc9b951..734a7e4886a0 100644 --- a/drivers/staging/iio/adc/ad7816.c +++ b/drivers/staging/iio/adc/ad7816.c @@ -118,8 +118,7 @@ static ssize_t ad7816_show_mode(struct device *dev, if (chip->mode) return sprintf(buf, "power-save\n"); - else - return sprintf(buf, "full\n"); + return sprintf(buf, "full\n"); } static ssize_t ad7816_store_mode(struct device *dev, @@ -226,8 +225,8 @@ static ssize_t ad7816_show_value(struct device *dev, if (value < 0) data = (1 << AD7816_TEMP_FLOAT_OFFSET) - data; return sprintf(buf, "%d.%.2d\n", value, data * 25); - } else - return sprintf(buf, "%u\n", data); + } + return sprintf(buf, "%u\n", data); } static IIO_DEVICE_ATTR(value, S_IRUGO, ad7816_show_value, NULL, 0); @@ -275,8 +274,8 @@ static ssize_t ad7816_show_oti(struct device *dev, (chip->oti_data[chip->channel_id] - AD7816_BOUND_VALUE_BASE); return sprintf(buf, "%d\n", value); - } else - return sprintf(buf, "%u\n", chip->oti_data[chip->channel_id]); + } + return sprintf(buf, "%u\n", chip->oti_data[chip->channel_id]); } static inline ssize_t ad7816_set_oti(struct device *dev,