From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Blumenstingl Date: Mon, 12 Mar 2018 20:43:19 +0000 Subject: Re: [PATCH] iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock() Message-Id: List-Id: References: <20180308093153.GB16525@mwanda> In-Reply-To: <20180308093153.GB16525@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Carlo Caione , Kevin Hilman , Rob Herring , Paolo Cretaro , Heiner Kallweit , "Gustavo A. R. Silva" , Xingyu Chen , linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org Hi Dan, On Thu, Mar 8, 2018 at 10:31 AM, Dan Carpenter wrote: > The meson_sar_adc_lock() function is not supposed to hold the > "indio_dev->mlock" on the error path. > > Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") > Signed-off-by: Dan Carpenter Acked-by: Martin Blumenstingl (even if I might be too late already since Jonathan already applied this patch) thank you for finding and fixing this! out of curiosity: did you find this with some tool (sparse?) or by looking at the code? Regards Martin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20180308093153.GB16525@mwanda> References: <20180308093153.GB16525@mwanda> From: Martin Blumenstingl Date: Mon, 12 Mar 2018 21:43:19 +0100 Message-ID: Subject: Re: [PATCH] iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock() To: Dan Carpenter Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Carlo Caione , Kevin Hilman , Rob Herring , Paolo Cretaro , Heiner Kallweit , "Gustavo A. R. Silva" , Xingyu Chen , linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" List-ID: Hi Dan, On Thu, Mar 8, 2018 at 10:31 AM, Dan Carpenter wrote: > The meson_sar_adc_lock() function is not supposed to hold the > "indio_dev->mlock" on the error path. > > Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") > Signed-off-by: Dan Carpenter Acked-by: Martin Blumenstingl (even if I might be too late already since Jonathan already applied this patch) thank you for finding and fixing this! out of curiosity: did you find this with some tool (sparse?) or by looking at the code? Regards Martin