Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org
Subject: Re: [RFC 40/42] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
Date: Fri, 10 May 2013 10:57:37 +0200	[thread overview]
Message-ID: <518CB681.4030709@phrozen.org> (raw)
In-Reply-To: <1368173847-5661-41-git-send-email-wsa@the-dreams.de>

On 10/05/13 10:17, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang<wsa@the-dreams.de>

Acked-by: John Crispin <blogic@openwrt.org>

> ---
>   arch/mips/lantiq/xway/gptu.c |    7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
> index 9861c86..26226f0 100644
> --- a/arch/mips/lantiq/xway/gptu.c
> +++ b/arch/mips/lantiq/xway/gptu.c
> @@ -143,13 +143,8 @@ static int gptu_probe(struct platform_device *pdev)
>   		return -EINVAL;
>   	}
>
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get resource\n");
> -		return -ENOMEM;
> -	}
> -
>   	/* remap gptu register range */
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>   	gptu_membase = devm_ioremap_resource(&pdev->dev, res);
>   	if (IS_ERR(gptu_membase))
>   		return PTR_ERR(gptu_membase);

      reply	other threads:[~2013-05-10  9:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10  8:16 [RFC 00/42] devm improvement series, part #1 Wolfram Sang
2013-05-10  8:17 ` [RFC 40/42] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource Wolfram Sang
2013-05-10  8:57   ` John Crispin [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=518CB681.4030709@phrozen.org \
    --to=john@phrozen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=wsa@the-dreams.de \
    /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