mirror of https://gitee.com/openkylin/linux.git
staging: iio: addac: Remove unnecessary else after return
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0d9363c5f7
commit
09971adc33
|
@ -465,9 +465,8 @@ static ssize_t adt7316_show_all_ad_channels(struct device *dev,
|
|||
return sprintf(buf, "0 - VDD\n1 - Internal Temperature\n"
|
||||
"2 - External Temperature or AIN1\n"
|
||||
"3 - AIN2\n4 - AIN3\n5 - AIN4\n");
|
||||
else
|
||||
return sprintf(buf, "0 - VDD\n1 - Internal Temperature\n"
|
||||
"2 - External Temperature\n");
|
||||
return sprintf(buf, "0 - VDD\n1 - Internal Temperature\n"
|
||||
"2 - External Temperature\n");
|
||||
}
|
||||
|
||||
static IIO_DEVICE_ATTR(all_ad_channels, S_IRUGO,
|
||||
|
@ -637,7 +636,7 @@ static ssize_t adt7316_show_da_high_resolution(struct device *dev,
|
|||
if (chip->config3 & ADT7316_DA_HIGH_RESOLUTION) {
|
||||
if (chip->id == ID_ADT7316 || chip->id == ID_ADT7516)
|
||||
return sprintf(buf, "1 (12 bits)\n");
|
||||
else if (chip->id == ID_ADT7317 || chip->id == ID_ADT7517)
|
||||
if (chip->id == ID_ADT7317 || chip->id == ID_ADT7517)
|
||||
return sprintf(buf, "1 (10 bits)\n");
|
||||
}
|
||||
|
||||
|
@ -919,8 +918,7 @@ static ssize_t adt7316_show_all_DAC_update_modes(struct device *dev,
|
|||
"1 - auto at MSB DAC AB and CD writing\n"
|
||||
"2 - auto at MSB DAC ABCD writing\n"
|
||||
"3 - manual\n");
|
||||
else
|
||||
return sprintf(buf, "manual\n");
|
||||
return sprintf(buf, "manual\n");
|
||||
}
|
||||
|
||||
static IIO_DEVICE_ATTR(all_DAC_update_modes, S_IRUGO,
|
||||
|
@ -1068,9 +1066,8 @@ static ssize_t adt7316_show_DAC_internal_Vref(struct device *dev,
|
|||
return sprintf(buf, "0x%x\n",
|
||||
(chip->dac_config & ADT7516_DAC_IN_VREF_MASK) >>
|
||||
ADT7516_DAC_IN_VREF_OFFSET);
|
||||
else
|
||||
return sprintf(buf, "%d\n",
|
||||
!!(chip->dac_config & ADT7316_DAC_IN_VREF));
|
||||
return sprintf(buf, "%d\n",
|
||||
!!(chip->dac_config & ADT7316_DAC_IN_VREF));
|
||||
}
|
||||
|
||||
static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev,
|
||||
|
|
Loading…
Reference in New Issue