From c842f241956f880fbba9bc041b196a249f80d131 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Sat, 18 Jan 2014 19:05:00 +0000 Subject: [PATCH] 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 --- drivers/staging/iio/adc/mxs-lradc.c | 4 ---- 1 file changed, 4 deletions(-) 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) -- 2.20.1