From: Jonas Gorski <jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch v2] spi: bcm63xx-hsspi: checking for ERR_PTR instead of NULL
Date: Fri, 6 Dec 2013 15:48:08 +0100 [thread overview]
Message-ID: <CAOiHx=k5NFrCy9yJNdn-wYeYXJixrNXVCcdyy-TOHTMtb5WvxQ@mail.gmail.com> (raw)
In-Reply-To: <20131206141212.GA956-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
On Fri, Dec 6, 2013 at 3:12 PM, Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> devm_request_and_ioremap() returns NULL on error, it doesn't return an
> ERR_PTR(). This patch fixes it by switching to devm_ioremap_resource()
> which is the prefered function anyway.
>
> Fixes: 142168eba9dc ('spi: bcm63xx-hsspi: add bcm63xx HSSPI driver')
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Thanks.
Acked-by: Jonas Gorski <jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
Jonas
> ---
> v2: switch to devm_ioremap_resource()
>
> diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
> index bc8d848d33b7..2cfe8eb619fd 100644
> --- a/drivers/spi/spi-bcm63xx-hsspi.c
> +++ b/drivers/spi/spi-bcm63xx-hsspi.c
> @@ -338,7 +338,7 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
> }
>
> res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - regs = devm_request_and_ioremap(dev, res_mem);
> + regs = devm_ioremap_resource(dev, res_mem);
> if (IS_ERR(regs))
> return PTR_ERR(regs);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-spi" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-06 14:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 12:58 [patch] spi: bcm63xx-hsspi: checking for ERR_PTR instead of NULL Dan Carpenter
[not found] ` <20131206125823.GA32369-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-12-06 13:08 ` Jonas Gorski
2013-12-06 13:34 ` Dan Carpenter
[not found] ` <CAOiHx=k87c_bFqFtJ7zJc9HxnjOEr2oMofNUsLkQbfQPrC04hQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-06 14:12 ` [patch v2] " Dan Carpenter
[not found] ` <20131206141212.GA956-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-12-06 14:48 ` Jonas Gorski [this message]
2013-12-09 17:24 ` Mark Brown
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='CAOiHx=k5NFrCy9yJNdn-wYeYXJixrNXVCcdyy-TOHTMtb5WvxQ@mail.gmail.com' \
--to=jogo-p3rkhjxn3npafugrpc6u6w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).