linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mark Brown <broonie@kernel.org>, Jonas Gorski <jogo@openwrt.org>
Cc: linux-spi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] spi: bcm63xx-hsspi: checking for ERR_PTR instead of NULL
Date: Fri, 6 Dec 2013 15:58:24 +0300	[thread overview]
Message-ID: <20131206125823.GA32369@elgon.mountain> (raw)

devm_request_and_ioremap() returns NULL on error, it doesn't return an
ERR_PTR().

Fixes: 142168eba9dc ('spi: bcm63xx-hsspi: add bcm63xx HSSPI driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index bc8d848d33b7..da9f85d55c81 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -339,8 +339,8 @@ 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);
-	if (IS_ERR(regs))
-		return PTR_ERR(regs);
+	if (!regs)
+		return -EADDRNOTAVAIL;
 
 	clk = clk_get(dev, "hsspi");
 

             reply	other threads:[~2013-12-06 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06 12:58 Dan Carpenter [this message]
     [not found] ` <20131206125823.GA32369-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-12-06 13:08   ` [patch] spi: bcm63xx-hsspi: checking for ERR_PTR instead of NULL 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
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=20131206125823.GA32369@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=broonie@kernel.org \
    --cc=jogo@openwrt.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-spi@vger.kernel.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).