Re: [PATCH V2] iio: mxs-lradc: Remove useless check in read_raw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/04/2013 10:22 PM, Otavio Salvador wrote:
On Wed, Jul 3, 2013 at 6:25 PM, Marek Vasut <marex-ynQEQJNshbs@xxxxxxxxxxxxxxxx> wrote:
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-ynQEQJNshbs@xxxxxxxxxxxxxxxx>
Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@xxxxxxxxxxxxxxxx>
Cc: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@xxxxxxxxxxxxxxxx>

Tested-by: Otavio Salvador <otavio-fKevB0iiKLMBZ+LybsDmbA@xxxxxxxxxxxxxxxx>

Acked-by: Hector Palacios <hector.palacios@xxxxxxxx>


Best regards,
--
Hector Palacios
--
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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux