]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 13 Dec 2021 02:05:07 +0000 (02:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:41:05 +0000 (07:41 +0200)
commit 045a31b95509c8f25f5f04ec5e0dec5cd09f2c5f upstream.

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>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20211213020507.1458-1-linmq006@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Alva Lan <alvalan9@foxmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/tegra/xusb.c

index 856397def89ac308dac4eb14ed4c312fb8e10bc0..8bd8d1f8eba295cef647b61e735d68efca5a4da5 100644 (file)
@@ -449,7 +449,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);