ad7291_threshold_reg() should return the register number of a threshold register, and thus be safe without handling a default case. Signed-off-by: Hartmut Knaack <knaack.h@xxxxxx> --- diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c index f5d29ef..b868c64 100644 --- a/drivers/staging/iio/adc/ad7291.c +++ b/drivers/staging/iio/adc/ad7291.c @@ -174,8 +174,6 @@ static unsigned int ad7291_threshold_reg(const struct iio_chan_spec *chan, case IIO_TEMP: offset = 8; break; - default: - return 0; } switch (info) { @@ -186,10 +184,7 @@ static unsigned int ad7291_threshold_reg(const struct iio_chan_spec *chan, return AD7291_DATA_LOW(offset); case IIO_EV_INFO_HYSTERESIS: return AD7291_HYST(offset); - default: - break; } - return 0; } static int ad7291_read_event_value(struct iio_dev *indio_dev, -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html