mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-17 15:14:35 +08:00
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,7 +465,6 @@ 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");
|
||||
}
|
||||
@ -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,7 +918,6 @@ 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");
|
||||
}
|
||||
|
||||
@ -1068,7 +1066,6 @@ 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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user