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 B2A4A2F12D6; Fri, 17 Oct 2025 15:00:23 +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=1760713223; cv=none; b=X/dFJCLpKhaCko6/6evaRfQ6Wf4jN2ySCrYVSNbBvmEq9bAjH7pPrsD8kO24NSrhJb74usnLxh951KKoRoes1vz43m6jJoBuA5GjN5tu1JEWrp5h22BQn8LUrG3HZOhQ2VPacZ75vJIJNCghQXvAX5Ud8YK/uJm65mQaLlYYNUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760713223; c=relaxed/simple; bh=32h6jc5id1EJVau5+MxJPlErQaTLv+m68qgJ/6EgXLg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ShZc/brLhT77XRFQ2cn+vYJjZZGZVQzloiJ5K0d00YUOcPIVewFjde+kEsoGSqwwZSEVEwfjaoukKKrqgnvQ0MbXNlNX3u+VqUXaKUX/2Uj6sFRYYMEK1YziQCoem7x98uExs7lwQGC0Iz/K221iHMZ5jayxL2ZtlbBFpEFNIiU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZEr4fpbM; 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="ZEr4fpbM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33F5AC4CEF9; Fri, 17 Oct 2025 15:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760713223; bh=32h6jc5id1EJVau5+MxJPlErQaTLv+m68qgJ/6EgXLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZEr4fpbMIVnddaDfL4mClsLS1/zkqCNcBhpR9pizGcU06oAvFG+Cj9uIZlYNg+N3H 52dgxup75jJg77dNHbvuj4ZZFnaszVPBr1dcardcHYA437njDG3r3ZTRgKW8m+fpeU LjV68tkf2C15nrLhJZik3Oc3wyB04loUEAMJTzSM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Miaoqian Lin , Kevin Hilman Subject: [PATCH 6.1 057/168] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init Date: Fri, 17 Oct 2025 16:52:16 +0200 Message-ID: <20251017145131.122558512@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251017145129.000176255@linuxfoundation.org> References: <20251017145129.000176255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miaoqian Lin commit 74139a64e8cedb6d971c78d5d17384efeced1725 upstream. Add missing of_node_put() calls to release device node references obtained via of_parse_phandle(). Fixes: 06ee7a950b6a ("ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x") Cc: stable@vger.kernel.org Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20250902075943.2408832-1-linmq006@gmail.com Signed-off-by: Kevin Hilman Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-omap2/pm33xx-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/arch/arm/mach-omap2/pm33xx-core.c +++ b/arch/arm/mach-omap2/pm33xx-core.c @@ -393,12 +393,15 @@ static int __init amx3_idle_init(struct if (!state_node) break; - if (!of_device_is_available(state_node)) + if (!of_device_is_available(state_node)) { + of_node_put(state_node); continue; + } if (i == CPUIDLE_STATE_MAX) { pr_warn("%s: cpuidle states reached max possible\n", __func__); + of_node_put(state_node); break; } @@ -408,6 +411,7 @@ static int __init amx3_idle_init(struct states[state_count].wfi_flags |= WFI_FLAG_WAKE_M3 | WFI_FLAG_FLUSH_CACHE; + of_node_put(state_node); state_count++; }