From: Jonathan Cameron <jic23@kernel.org>
To: Peng Fan <van.freenix@gmail.com>, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Tapasweni Pathak <tapaswenipathak@gmail.com>
Subject: Re: [PATCH] staging: iio: adc: lpc32xx: use correct reutrn value
Date: Mon, 31 Aug 2015 16:13:44 +0100 [thread overview]
Message-ID: <55E46F28.6010904@kernel.org> (raw)
In-Reply-To: <1440922377-16938-1-git-send-email-van.freenix@gmail.com>
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@gmail.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Hartmut Knaack <knaack.h@gmx.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Tapasweni Pathak <tapaswenipathak@gmail.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,
>
prev parent reply other threads:[~2015-08-31 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-30 8:12 [PATCH] staging: iio: adc: lpc32xx: use correct reutrn value Peng Fan
2015-08-31 15:13 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55E46F28.6010904@kernel.org \
--to=jic23@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=tapaswenipathak@gmail.com \
--cc=van.freenix@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.