Skip to content

Commit 074b6a8

Browse files
ZubairLKjic23
authored andcommitted
iio: ti_am335x_adc: cleanup error case
Driver is functional without this error case. Cleaned up. Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent a77d020 commit 074b6a8

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎drivers/iio/adc/ti_am335x_adc.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,
323323
struct tiadc_device *adc_dev = iio_priv(indio_dev);
324324
int i, map_val;
325325
unsigned int fifo1count, read, stepid;
326-
u32 step = UINT_MAX;
327326
bool found = false;
328327
u32 step_en;
329328
unsigned long timeout = jiffies + usecs_to_jiffies
@@ -353,15 +352,6 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,
353352
* Hence we need to flush out this data.
354353
*/
355354

356-
for (i = 0; i < ARRAY_SIZE(adc_dev->channel_step); i++) {
357-
if (chan->channel == adc_dev->channel_line[i]) {
358-
step = adc_dev->channel_step[i];
359-
break;
360-
}
361-
}
362-
if (WARN_ON_ONCE(step == UINT_MAX))
363-
return -EINVAL;
364-
365355
fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
366356
for (i = 0; i < fifo1count; i++) {
367357
read = tiadc_readl(adc_dev, REG_FIFO1);

0 commit comments

Comments
 (0)