iio: mxs-lradc: Remove useless check in read_raw
authorMarek Vasut <marex@denx.de>
Wed, 3 Jul 2013 21:25:00 +0000 (22:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 00:18:05 +0000 (17:18 -0700)
commitf7e0ca347bcb540e2894833eccc33f9a65f4c822
tree84f975e68216a0f2971c75a214b40a647abba269
parentabea758371f89b0cdb5f0b2dad24674e0148f2ee
iio: mxs-lradc: Remove useless check in read_raw

commit 2a961d0995cdadbfba565b28beada59c5ae7ebae upstream.

The removed check in the read_raw implementation was always true,
therefore remove it. This also fixes a bug, by closely inspecting
the code, one can notice the iio_validate_scan_mask_onehot() will
always return 1 and therefore the subsequent condition will always
succeed, therefore making the mxs_lradc_read_raw() function always
return -EINVAL; .

Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/adc/mxs-lradc.c