From: Alexandre Belloni Date: Sat, 18 Jan 2014 19:05:00 +0000 (+0000) Subject: iio: mxs-lradc: remove useless check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c842f241956f880fbba9bc041b196a249f80d131;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iio: mxs-lradc: remove useless check Checking the channel number is useless since mxs_lradc_read_raw() is called from a controlled environment and the driver is responsible for filing the struct iio_chan_spec. Signed-off-by: Alexandre Belloni Acked-by: Marek Vasut Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c index df71669bb60e..7b9224198bb8 100644 --- a/drivers/staging/iio/adc/mxs-lradc.c +++ b/drivers/staging/iio/adc/mxs-lradc.c @@ -897,10 +897,6 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev, { struct mxs_lradc *lradc = iio_priv(iio_dev); - /* Check for invalid channel */ - if (chan->channel > LRADC_MAX_TOTAL_CHANS) - return -EINVAL; - switch (m) { case IIO_CHAN_INFO_RAW: if (chan->type == IIO_TEMP)