From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21DD8401A2C; Tue, 31 Mar 2026 16:30:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774974636; cv=none; b=Y6ug4/E2SnZaAaJ1uaY0B8y7JJ9SqY4s7CM78ZMmWG822fWDi+/Eh4bTZceZaFPXpHHHsXLpHwi7mdnKs1BC3+YdG4jzTVrnDiOrhXEb/QhwqbnLgKXg1yjs6LH/oK2Dd2Pj2Oiv1+9Y7dZYiHJ4e95Ga9QhjVdImznLoB53QtQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774974636; c=relaxed/simple; bh=weRjn17jwD6uC0LQnM3y06tTR2s9R1wr9MZbCGbnylU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BFPQz3tc6FGk/9JaGUamvQ5lzR53frwKwUKI3CzvuOYHRnHAv5LjjKFUAQguQgkKJ/A3gXd/I16nGk73JbXH2SXMyee+xUU6FGKxPo9igBdUXyrW3NlsGy/eEm1HHeMNLar4E8tc3/I02wmw3PYOmKBrV1/9UGSGox7miGe3dUk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wGZBCRnG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wGZBCRnG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC321C19423; Tue, 31 Mar 2026 16:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774974636; bh=weRjn17jwD6uC0LQnM3y06tTR2s9R1wr9MZbCGbnylU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wGZBCRnGPgr7zFOy9sjFy28Y0wbTJXB/IYCqcKJnOUBL7gk7GeyNAbqImjSb+1g+X QKZDbTPNszvlDtcH5VFjC89Uz7bxMV4AvdfdPD9v8N2vYxyNfySbLCg1OkiGDgL8Tz hPqWeedkAaXZzb2yxYZbt1qVo9xGvVZjgjhBXnFw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vladimir Oltean , Felix Gu , Vinod Koul , Sasha Levin Subject: [PATCH 6.6 162/175] phy: ti: j721e-wiz: Fix device node reference leak in wiz_get_lane_phy_types() Date: Tue, 31 Mar 2026 18:22:26 +0200 Message-ID: <20260331161735.749577335@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260331161729.779738837@linuxfoundation.org> References: <20260331161729.779738837@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Felix Gu [ Upstream commit 584b457f4166293bdfa50f930228e9fb91a38392 ] The serdes device_node is obtained using of_get_child_by_name(), which increments the reference count. However, it is never put, leading to a reference leak. Add the missing of_node_put() calls to ensure the reference count is properly balanced. Fixes: 7ae14cf581f2 ("phy: ti: j721e-wiz: Implement DisplayPort mode to the wiz driver") Suggested-by: Vladimir Oltean Signed-off-by: Felix Gu Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20260212-wiz-v2-1-6e8bd4cc7a4a@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/ti/phy-j721e-wiz.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index fc3cd98c60ff4..a28c168b35d92 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -1424,6 +1424,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz) dev_err(dev, "%s: Reading \"reg\" from \"%s\" failed: %d\n", __func__, subnode->name, ret); + of_node_put(serdes); return ret; } of_property_read_u32(subnode, "cdns,num-lanes", &num_lanes); @@ -1438,6 +1439,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz) } } + of_node_put(serdes); return 0; } -- 2.53.0