From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <51D68572.3050705@digi.com> Date: Fri, 5 Jul 2013 10:36:02 +0200 From: Hector Palacios MIME-Version: 1.0 To: "linux-iio@vger.kernel.org" CC: Otavio Salvador , Marek Vasut , Jonathan Cameron , "fabio.estevam@freescale.com" Subject: Re: [PATCH V2] iio: mxs-lradc: Remove useless check in read_raw References: <1372886714-25456-1-git-send-email-marex@denx.de> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed List-ID: On 07/04/2013 10:22 PM, Otavio Salvador wrote: > On Wed, Jul 3, 2013 at 6:25 PM, Marek Vasut 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 >> Cc: Jonathan Cameron >> Cc: Fabio Estevam > > Tested-by: Otavio Salvador Acked-by: Hector Palacios Best regards, -- Hector Palacios