Commit 15c64366 authored by Roxana Blaj's avatar Roxana Blaj Committed by Greg Kroah-Hartman

staging: iio: addac: remove unnecessary else

This fixes the checkpatch.pl warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: default avatarRoxana Blaj <roxanagabriela10@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 61e15f01
...@@ -263,7 +263,7 @@ static ssize_t adt7316_store_enabled(struct device *dev, ...@@ -263,7 +263,7 @@ static ssize_t adt7316_store_enabled(struct device *dev,
if (_adt7316_store_enabled(chip, enable) < 0) if (_adt7316_store_enabled(chip, enable) < 0)
return -EIO; return -EIO;
else
return len; return len;
} }
...@@ -325,7 +325,7 @@ static ssize_t adt7316_show_mode(struct device *dev, ...@@ -325,7 +325,7 @@ static ssize_t adt7316_show_mode(struct device *dev,
if (chip->config2 & ADT7316_AD_SINGLE_CH_MODE) if (chip->config2 & ADT7316_AD_SINGLE_CH_MODE)
return sprintf(buf, "single_channel\n"); return sprintf(buf, "single_channel\n");
else
return sprintf(buf, "round_robin\n"); return sprintf(buf, "round_robin\n");
} }
...@@ -385,17 +385,17 @@ static ssize_t adt7316_show_ad_channel(struct device *dev, ...@@ -385,17 +385,17 @@ static ssize_t adt7316_show_ad_channel(struct device *dev,
if (((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) && if (((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) &&
(chip->config1 & ADT7516_SEL_AIN1_2_EX_TEMP_MASK) == 0) (chip->config1 & ADT7516_SEL_AIN1_2_EX_TEMP_MASK) == 0)
return sprintf(buf, "2 - AIN1\n"); return sprintf(buf, "2 - AIN1\n");
else
return sprintf(buf, "2 - External Temperature\n"); return sprintf(buf, "2 - External Temperature\n");
case ADT7516_AD_SINGLE_CH_AIN2: case ADT7516_AD_SINGLE_CH_AIN2:
if ((chip->config1 & ADT7516_SEL_AIN1_2_EX_TEMP_MASK) == 0) if ((chip->config1 & ADT7516_SEL_AIN1_2_EX_TEMP_MASK) == 0)
return sprintf(buf, "3 - AIN2\n"); return sprintf(buf, "3 - AIN2\n");
else
return sprintf(buf, "N/A\n"); return sprintf(buf, "N/A\n");
case ADT7516_AD_SINGLE_CH_AIN3: case ADT7516_AD_SINGLE_CH_AIN3:
if (chip->config1 & ADT7516_SEL_AIN3) if (chip->config1 & ADT7516_SEL_AIN3)
return sprintf(buf, "4 - AIN3\n"); return sprintf(buf, "4 - AIN3\n");
else
return sprintf(buf, "N/A\n"); return sprintf(buf, "N/A\n");
case ADT7516_AD_SINGLE_CH_AIN4: case ADT7516_AD_SINGLE_CH_AIN4:
return sprintf(buf, "5 - AIN4\n"); return sprintf(buf, "5 - AIN4\n");
...@@ -856,7 +856,7 @@ static ssize_t adt7316_show_DAC_update_mode(struct device *dev, ...@@ -856,7 +856,7 @@ static ssize_t adt7316_show_DAC_update_mode(struct device *dev,
if (!(chip->config3 & ADT7316_DA_EN_VIA_DAC_LDCA)) if (!(chip->config3 & ADT7316_DA_EN_VIA_DAC_LDCA))
return sprintf(buf, "manual\n"); return sprintf(buf, "manual\n");
else {
switch (chip->dac_config & ADT7316_DA_EN_MODE_MASK) { switch (chip->dac_config & ADT7316_DA_EN_MODE_MASK) {
case ADT7316_DA_EN_MODE_SINGLE: case ADT7316_DA_EN_MODE_SINGLE:
return sprintf(buf, return sprintf(buf,
...@@ -870,7 +870,6 @@ static ssize_t adt7316_show_DAC_update_mode(struct device *dev, ...@@ -870,7 +870,6 @@ static ssize_t adt7316_show_DAC_update_mode(struct device *dev,
default: /* ADT7316_DA_EN_MODE_LDAC */ default: /* ADT7316_DA_EN_MODE_LDAC */
return sprintf(buf, "3 - manual\n"); return sprintf(buf, "3 - manual\n");
} }
}
} }
static ssize_t adt7316_store_DAC_update_mode(struct device *dev, static ssize_t adt7316_store_DAC_update_mode(struct device *dev,
...@@ -1180,7 +1179,7 @@ static ssize_t adt7316_show_ad(struct adt7316_chip_info *chip, ...@@ -1180,7 +1179,7 @@ static ssize_t adt7316_show_ad(struct adt7316_chip_info *chip,
if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX)
return sprintf(buf, "%d\n", data); return sprintf(buf, "%d\n", data);
else
break; break;
} }
...@@ -1648,7 +1647,7 @@ static ssize_t adt7316_show_bus_type(struct device *dev, ...@@ -1648,7 +1647,7 @@ static ssize_t adt7316_show_bus_type(struct device *dev,
if (stat) if (stat)
return sprintf(buf, "spi\n"); return sprintf(buf, "spi\n");
else
return sprintf(buf, "i2c\n"); return sprintf(buf, "i2c\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment