From: Jonathan Cameron <jic23@kernel.org>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexander Sverdlin <alexander.sverdlin@gmail.com>,
<linux-iio@vger.kernel.org>
Subject: Re: [PATCH -next] iio: ep93xx: remove redundant return value check of platform_get_resource()
Date: Sat, 20 Jan 2018 16:43:46 +0000 [thread overview]
Message-ID: <20180120164346.4813b6ca@archlinux> (raw)
In-Reply-To: <1516188600-170557-1-git-send-email-weiyongjun1@huawei.com>
On Wed, 17 Jan 2018 11:30:00 +0000
Wei Yongjun <weiyongjun1@huawei.com> wrote:
> Remove unneeded error handling on the result of a call
> to platform_get_resource() when the value is passed to
> devm_ioremap_resource().
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ep93xx_adc.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
> index 81c9015..5036c392 100644
> --- a/drivers/iio/adc/ep93xx_adc.c
> +++ b/drivers/iio/adc/ep93xx_adc.c
> @@ -167,10 +167,6 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
> priv = iio_priv(iiodev);
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res) {
> - dev_err(&pdev->dev, "Cannot obtain memory resource\n");
> - return -ENXIO;
> - }
> priv->base = devm_ioremap_resource(&pdev->dev, res);
> if (IS_ERR(priv->base)) {
> dev_err(&pdev->dev, "Cannot map memory resource\n");
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2018-01-20 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 11:30 [PATCH -next] iio: ep93xx: remove redundant return value check of platform_get_resource() Wei Yongjun
2018-01-20 16:43 ` 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=20180120164346.4813b6ca@archlinux \
--to=jic23@kernel.org \
--cc=alexander.sverdlin@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=weiyongjun1@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).