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 E1214C8F0 for ; Sun, 1 Mar 2026 01:23:48 +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=1772328229; cv=none; b=GNziBOCO0kvgk8bkL0U+3R6IxVjnZSzkL0LPsoXXt+4N71q1Yjw/xW5BQAiIo+oZ1ejROkthM05Fgip9NMZDbXhtwh5YuqJ4A66SnWAQmSXWU2wUKQejTG9L74QkeIRylFLIVZ0Jhzs6XRCBK+rxBVYvaxkl1CqNDAMQ1Ja1QH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328229; c=relaxed/simple; bh=b3kMN37MW2GEgBKFxY/2tw343UUnKdzvSf/NY2t/WRo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AL8k7yvVZmbbUdTd12PnGIuoD43A3rL9s04uUYBEBAcgr2V0hPCU9rNfamuFa9nu3v33rZIwObp8sjUTDTMFvVekItlv6SVq95ww85+TWT6hieF3mTXwOyWXADDD1YFIIonYVZgyMiiCJApxxDZ3M5CfZ/KyLnFSDbJXqVKkPcM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jiu2mKlT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jiu2mKlT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E44C19421; Sun, 1 Mar 2026 01:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772328228; bh=b3kMN37MW2GEgBKFxY/2tw343UUnKdzvSf/NY2t/WRo=; h=From:To:Cc:Subject:Date:From; b=Jiu2mKlTiS3/+XPsTpffW1EihBs1PziWGJd2QFjwW2mtb0LZ65HJ6uLo4PjtdHIq8 ROHSkJbZca2U6CZwL+zjUenjJWi8tRcR9kYbSWTJzJ9bnb5dupZ5CUkTSqaH76WSE+ jQUZrXkQHIF2afkpNaRLy+htCO/oG1ImLcCFl5Q1t5jcbXMYkLEOqBTp/eXvbp6CFN rFydgw7Lzq7eIpJ/ZXcqevhwvw6fv4g8pI2z7XeCwE1L6zse++DtEv66gciv+R/cy0 5NSjIayKOI4yI4R83cahMRiOf8r+ZWk4HKVSxnEzyZ3mKwRV4MapPo9IIF2yGfeNTd V4ZDkiw7wxtqg== From: Sasha Levin To: stable@vger.kernel.org, krzysztof.kozlowski@oss.qualcomm.com Cc: Srinivas Kandagatla , Greg Kroah-Hartman Subject: FAILED: Patch "nvmem: Drop OF node reference on nvmem_add_one_cell() failure" failed to apply to 6.12-stable tree Date: Sat, 28 Feb 2026 20:23:46 -0500 Message-ID: <20260301012346.1680522-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ From f397bc0781553d01b4cdba506c09334a31cb0ec5 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 16 Jan 2026 17:08:43 +0000 Subject: [PATCH] nvmem: Drop OF node reference on nvmem_add_one_cell() failure If nvmem_add_one_cell() failed, the ownership of "child" (or "info.np"), thus its OF reference, is not passed further and function should clean up by putting the reference it got via earlier of_node_get(). Note that this is independent of references obtained via for_each_child_of_node() loop. Fixes: 50014d659617 ("nvmem: core: use nvmem_add_one_cell() in nvmem_add_cells_from_of()") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20260116170846.733558-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/nvmem/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 387c88c552595..ff68fd5ad3d6f 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -831,6 +831,7 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod kfree(info.name); if (ret) { of_node_put(child); + of_node_put(info.np); return ret; } } -- 2.51.0