From: Lizhi Hou <lizhi.hou@amd.com>
To: Yue Haibing <yuehaibing@huawei.com>, <brian.xu@amd.com>,
<raj.kumar.rampelli@amd.com>, <vkoul@kernel.org>,
<michal.simek@amd.com>, <sonal.santan@amd.com>,
<max.zhen@amd.com>
Cc: <dmaengine@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] dmaengine: xilinx: xdma: Fix NULL vs IS_ERR() bug
Date: Tue, 20 Aug 2024 08:29:22 -0700 [thread overview]
Message-ID: <d28a5f5c-9430-11a7-2330-84e1e781fd1d@amd.com> (raw)
In-Reply-To: <20240820132827.52108-1-yuehaibing@huawei.com>
Please see:
https://lore.kernel.org/dmaengine/20240819193641.600176-1-harshit.m.mogalapalli@oracle.com/
Thanks,
Lizhi
On 8/20/24 06:28, Yue Haibing wrote:
> devm_regmap_init_mmio() never returns NULL pointer, it will
> return ERR_PTR() when it fails, so check it with IS_ERR().
>
> Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
> drivers/dma/xilinx/xdma.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
> index 718842fdaf98..44fae351f0a0 100644
> --- a/drivers/dma/xilinx/xdma.c
> +++ b/drivers/dma/xilinx/xdma.c
> @@ -1240,7 +1240,8 @@ static int xdma_probe(struct platform_device *pdev)
>
> xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
> &xdma_regmap_config);
> - if (!xdev->rmap) {
> + if (IS_ERR(xdev->rmap)) {
> + ret = PTR_ERR(xdev->rmap);
> xdma_err(xdev, "config regmap failed: %d", ret);
> goto failed;
> }
prev parent reply other threads:[~2024-08-20 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 13:28 Yue Haibing
2024-08-20 15:29 ` Lizhi Hou [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=d28a5f5c-9430-11a7-2330-84e1e781fd1d@amd.com \
--to=lizhi.hou@amd.com \
--cc=brian.xu@amd.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=max.zhen@amd.com \
--cc=michal.simek@amd.com \
--cc=raj.kumar.rampelli@amd.com \
--cc=sonal.santan@amd.com \
--cc=vkoul@kernel.org \
--cc=yuehaibing@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
all inboxes | Powered by JetHome®