From: Nishanth Menon <nm@ti.com>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] soc: ti: Fix NULL vs IS_ERR() checking in dma_init
Date: Mon, 13 Dec 2021 09:59:30 -0600 [thread overview]
Message-ID: <20211213155930.mcxlc5m3niqh77xi@annotate> (raw)
In-Reply-To: <20211212071301.3011-1-linmq006@gmail.com>
On 07:13-20211212, Miaoqian Lin wrote:
> Since devm_ioremap_resource() function return error pointers.
> The pktdma_get_regs() function does not return NULL, It return error
> pointers too. Using IS_ERR() to check the return value to fix this.
Thanks.. but..
>
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> drivers/soc/ti/knav_dma.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
> index 591d14ebcb11..9f82cf906949 100644
> --- a/drivers/soc/ti/knav_dma.c
> +++ b/drivers/soc/ti/knav_dma.c
> @@ -646,31 +646,31 @@ static int dma_init(struct device_node *cloud, struct device_node *dma_node)
> }
[...]
>
> dma->reg_tx_chan = pktdma_get_regs(dma, node, 1, &size);
> - if (!dma->reg_tx_chan)
> - return -ENODEV;
> + if (IS_ERR(dma->reg_tx_cha))
> + return PTR_ERR(dma->reg_tx_cha);
Did you mean reg_tx_chan instead of reg_tx_cha ?
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D)/Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-12-13 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-12 7:13 [PATCH] soc: ti: Fix NULL vs IS_ERR() checking in dma_init Miaoqian Lin
2021-12-13 15:59 ` Nishanth Menon [this message]
2021-12-14 1:55 ` [PATCH v2] " Miaoqian Lin
2021-12-16 12:46 ` Nishanth Menon
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=20211213155930.mcxlc5m3niqh77xi@annotate \
--to=nm@ti.com \
--cc=linmq006@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ssantosh@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