From: Miaoqian Lin <linmq006@gmail.com>
To: digetx@gmail.com
Cc: jckuo@nvidia.com, jonathanh@nvidia.com, kishon@ti.com,
linmq006@gmail.com, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org, linux-tegra@vger.kernel.org,
thierry.reding@gmail.com, vkoul@kernel.org
Subject: [PATCH v2] phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function
Date: Mon, 13 Dec 2021 02:05:07 +0000 [thread overview]
Message-ID: <20211213020507.1458-1-linmq006@gmail.com> (raw)
In-Reply-To: <942f943c-9ec8-9887-aa6d-4d133821beca@gmail.com>
callers of tegra_xusb_find_port_node() function only do NULL checking for
the return value. return NULL instead of ERR_PTR(-ENOMEM) to keep
consistent.
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/phy/tegra/xusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 963de5913e50..aa5237eacd29 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -455,7 +455,7 @@ tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
if (!name) {
of_node_put(ports);
- return ERR_PTR(-ENOMEM);
+ return NULL;
}
np = of_get_child_by_name(ports, name);
kfree(name);
--
2.17.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: Miaoqian Lin <linmq006@gmail.com>
To: digetx@gmail.com
Cc: jckuo@nvidia.com, jonathanh@nvidia.com, kishon@ti.com,
linmq006@gmail.com, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org, linux-tegra@vger.kernel.org,
thierry.reding@gmail.com, vkoul@kernel.org
Subject: [PATCH v2] phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function
Date: Mon, 13 Dec 2021 02:05:07 +0000 [thread overview]
Message-ID: <20211213020507.1458-1-linmq006@gmail.com> (raw)
In-Reply-To: <942f943c-9ec8-9887-aa6d-4d133821beca@gmail.com>
callers of tegra_xusb_find_port_node() function only do NULL checking for
the return value. return NULL instead of ERR_PTR(-ENOMEM) to keep
consistent.
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/phy/tegra/xusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 963de5913e50..aa5237eacd29 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -455,7 +455,7 @@ tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
if (!name) {
of_node_put(ports);
- return ERR_PTR(-ENOMEM);
+ return NULL;
}
np = of_get_child_by_name(ports, name);
kfree(name);
--
2.17.1
next prev parent reply other threads:[~2021-12-13 2:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-12 6:50 [PATCH] phy: tegra: xusb: Fix NULL vs IS_ERR_OR_NULL checking Miaoqian Lin
2021-12-12 6:50 ` Miaoqian Lin
2021-12-12 14:31 ` Dmitry Osipenko
2021-12-12 14:31 ` Dmitry Osipenko
2021-12-13 2:05 ` Miaoqian Lin [this message]
2021-12-13 2:05 ` [PATCH v2] phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function Miaoqian Lin
2021-12-13 10:24 ` Thierry Reding
2021-12-13 10:24 ` Thierry Reding
2021-12-14 7:37 ` Vinod Koul
2021-12-14 7:37 ` 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=20211213020507.1458-1-linmq006@gmail.com \
--to=linmq006@gmail.com \
--cc=digetx@gmail.com \
--cc=jckuo@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.