lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <55E46F28.6010904@kernel.org>
Date:	Mon, 31 Aug 2015 16:13:44 +0100
From:	Jonathan Cameron <jic23@...nel.org>
To:	Peng Fan <van.freenix@...il.com>, gregkh@...uxfoundation.org
Cc:	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-iio@...r.kernel.org, Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald <pmeerw@...erw.net>,
	Tapasweni Pathak <tapaswenipathak@...il.com>
Subject: Re: [PATCH] staging: iio: adc: lpc32xx: use correct reutrn value

On 30/08/15 09:12, Peng Fan wrote:
> To lpc32xx_adc driver, when platform_get_resource or
> platform_get_irq failed, we should use -ENXIO as a
> return value, but not -EBUSY.
> 
> Signed-off-by: Peng Fan <van.freenix@...il.com>
> Cc: Jonathan Cameron <jic23@...nel.org>
> Cc: Hartmut Knaack <knaack.h@....de>
> Cc: Lars-Peter Clausen <lars@...afoo.de>
> Cc: Peter Meerwald <pmeerw@...erw.net>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Tapasweni Pathak <tapaswenipathak@...il.com>
Applied to the togreg branch of iio.git - initially pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/adc/lpc32xx_adc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/adc/lpc32xx_adc.c b/drivers/staging/iio/adc/lpc32xx_adc.c
> index 5331c44..bcf4ebb 100644
> --- a/drivers/staging/iio/adc/lpc32xx_adc.c
> +++ b/drivers/staging/iio/adc/lpc32xx_adc.c
> @@ -137,7 +137,7 @@ static int lpc32xx_adc_probe(struct platform_device *pdev)
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res) {
>  		dev_err(&pdev->dev, "failed to get platform I/O memory\n");
> -		return -EBUSY;
> +		return -ENXIO;
>  	}
>  
>  	iodev = devm_iio_device_alloc(&pdev->dev, sizeof(*info));
> @@ -162,7 +162,7 @@ static int lpc32xx_adc_probe(struct platform_device *pdev)
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq <= 0) {
>  		dev_err(&pdev->dev, "failed getting interrupt resource\n");
> -		return -EINVAL;
> +		return -ENXIO;
>  	}
>  
>  	retval = devm_request_irq(&pdev->dev, irq, lpc32xx_adc_isr, 0,
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ