From: Pierre Yves MORDRET <pierre-yves.mordret@st.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe
Date: Tue, 03 Oct 2017 12:17:26 +0000 [thread overview]
Message-ID: <394b11d8-af54-e8dc-4509-be5fea924c41@st.com> (raw)
In-Reply-To: <20171003105450.nll2ogf44l3eq4ge@mwanda>
On 10/03/2017 12:54 PM, Dan Carpenter wrote:
> devm_ioremap_resource() doesn't return NULL, it returns error pointers.
>
> Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
> index 22812e7a953b..d5db0f6e1ff8 100644
> --- a/drivers/dma/stm32-dmamux.c
> +++ b/drivers/dma/stm32-dmamux.c
> @@ -257,8 +257,8 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
> return -ENODEV;
>
> iomem = devm_ioremap_resource(&pdev->dev, res);
> - if (!iomem)
> - return -ENOMEM;
> + if (IS_ERR(iomem))
> + return PTR_ERR(iomem);
>
> spin_lock_init(&stm32_dmamux->lock);
>
>
Acked-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
next prev parent reply other threads:[~2017-10-03 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 10:54 [PATCH] dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe Dan Carpenter
2017-10-03 12:17 ` Pierre Yves MORDRET [this message]
2017-10-08 10:59 ` Vinod Koul
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=394b11d8-af54-e8dc-4509-be5fea924c41@st.com \
--to=pierre-yves.mordret@st.com \
--cc=kernel-janitors@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