From patchwork Tue Feb 20 21:44:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bethany Jamison X-Patchwork-Id: 1901683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TfXxs6Jyrz23cl for ; Wed, 21 Feb 2024 08:45:04 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rcXv1-00066s-Oa; Tue, 20 Feb 2024 21:44:51 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rcXuw-00066S-WB for kernel-team@lists.ubuntu.com; Tue, 20 Feb 2024 21:44:47 +0000 Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id BDE4B3FA51 for ; Tue, 20 Feb 2024 21:44:46 +0000 (UTC) Received: by mail-io1-f71.google.com with SMTP id ca18e2360f4ac-7c75dee76c0so112630039f.1 for ; Tue, 20 Feb 2024 13:44:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708465485; x=1709070285; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=owbCY6G60zXxxtfTX+EhAKHvxJwa1Ev579eaMfoM5RY=; b=LozlwK0mhJV7+nqasmF7SCJCwacR/YRejDfJdw56SaW7MgVOoFc/FHM+XPoKmqp+He hJsKFI+qtBoQhsB8VNjEIm2QAMVa1RyIY73wPTa5ddqJ9Bz/39tzSPZcSPxGEuaEQIiw slhrK/JWe6WX+5jgmRpD3Yn1UHHJGztaVGL3jZ4eZj8fbOfKzMbFwk06zvG+720mY/2y z8mj48jdg5W5BjdCMh4mWk/cggbtNoR4p2D9abLk5rfs4d26/PGMUh8p+BMGNYWKwQw/ pljHkZCBXRRRc8ZVJv3gCdJGEjSmlREa/7U3caCEdIzyuGl7flXqt3bpUB74s2SfIJzI x3Wg== X-Gm-Message-State: AOJu0YwOr2F3AyAtxIjtGTa4lAKu5AS5WSNeSHCmWy7iXkUcytKfyegs IqEixMA9e+BMBiLNJxyaAd8DM4cTI+CcfMwQrQ7p4uirKkaIeDGb3Z33i9Rw7fowSDaqKgg0cFY R6aaQy60oVALanp8DS6l0Ofpe8vPSkSl0wTDj9GnIEtJhbQuBXG9aDU0pxhp/WcvnvAKr1x3FYe zwmtxJSOEdbg== X-Received: by 2002:a05:6602:2772:b0:7c7:2e71:c988 with SMTP id l18-20020a056602277200b007c72e71c988mr7361690ioe.10.1708465485202; Tue, 20 Feb 2024 13:44:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRMOoAThejTPEymCKFCL+0xWixnpJqhQGrsKOVXHu+WJ6C2L2PyecMBygIMZuU0qFvKMxZkg== X-Received: by 2002:a05:6602:2772:b0:7c7:2e71:c988 with SMTP id l18-20020a056602277200b007c72e71c988mr7361679ioe.10.1708465484825; Tue, 20 Feb 2024 13:44:44 -0800 (PST) Received: from smtp.gmail.com (104-218-69-129.dynamic.lnk.ne.allofiber.net. [104.218.69.129]) by smtp.gmail.com with ESMTPSA id dk27-20020a0566384bdb00b0047437f3f6c3sm612672jab.122.2024.02.20.13.44.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 13:44:44 -0800 (PST) From: Bethany Jamison To: kernel-team@lists.ubuntu.com Subject: [SRU][Jammy][Focal][PATCH 1/1] phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function Date: Tue, 20 Feb 2024 15:44:43 -0600 Message-Id: <20240220214443.40506-2-bethany.jamison@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240220214443.40506-1-bethany.jamison@canonical.com> References: <20240220214443.40506-1-bethany.jamison@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Miaoqian Lin 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 Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20211213020507.1458-1-linmq006@gmail.com Signed-off-by: Vinod Koul (cherry picked from commit 045a31b95509c8f25f5f04ec5e0dec5cd09f2c5f) CVE-2023-23000 Signed-off-by: Bethany Jamison Acked-by: Andrei Gherzan --- 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 119e2c039225f..6869d82e9ac96 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);