From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 68C8E3A16AC; Tue, 16 Jun 2026 16:09:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781626158; cv=none; b=WoOa7pMTz/5RRbi1fFCpOJYDxGF/W5D8kL7aKbo77D+f9pvtyQtZjbKpaciCbsAGwl2BshhLYX4ozcP45obBBK0RFTRA2n96cntcg9OOP2vvkYx5pIXLotfc+6ZBpXeal6DIognCLQifSl3L2xpgHyg1/HbHos6UfzuQ5ZezCmU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781626158; c=relaxed/simple; bh=VKNL8EmqQTUSMIBY/6P3uDlchp1vscFZlUU+YsFtEGM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Al/FKh7MQRujw0HKfYD+POxbsP7JeDwTLJCTvr/Mf1+KsLEwv0BEbpxieSr1K/BsfhTgX4GuztqELZcIY/W0J61eczNyjXjQgZ+3BGLi9//54upCvtAH8y/nKLTsjNILxgoWReMdXVQGAHNqyjn+BNOsygBhj9K8+c8FUPNFh6Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qUoDgnvu; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qUoDgnvu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2ADA1F000E9; Tue, 16 Jun 2026 16:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781626156; bh=+lSvKY7vmTjaKjSbl5Rsm5BqXGkCORvTBMWa/HbdZuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qUoDgnvutEgOC8DY/W31Bv3mlVZVBMCLJshvW4Mqn1lifl+fjCR4Mt+0jJ0fi+Ycy sXhkUMSzphIGbhhSpp3iMGggkSLfuKsnVUQ/7wu8uCVFw7l3fybGCkR1Fum4E8LtpP hMeXPSnSVQN4yF42L4nnjoJRtJ0ds8F0At3sEOTw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bartosz Golaszewski , Srinivas Kandagatla Subject: [PATCH 6.18 274/325] slimbus: qcom-ngd-ctrl: fix OF node refcount Date: Tue, 16 Jun 2026 20:31:10 +0530 Message-ID: <20260616145112.360529676@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145057.827196531@linuxfoundation.org> References: <20260616145057.827196531@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bartosz Golaszewski commit 120134fe75c6b0ae38f14eb8b548ad1e5761f912 upstream. Platform devices created with platform_device_alloc() call platform_device_release() when the last reference to the device's kobject is dropped. This function calls of_node_put() unconditionally. This works fine for devices created with platform_device_register_full() but users of the split approach (platform_device_alloc() + platform_device_add()) must bump the reference of the of_node they assign manually. Add the missing call to of_node_get(). Cc: stable@vger.kernel.org Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20260530204421.116824-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/slimbus/qcom-ngd-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1547,7 +1547,7 @@ static int of_qcom_slim_ngd_register(str of_node_put(node); return ret; } - ngd->pdev->dev.of_node = node; + ngd->pdev->dev.of_node = of_node_get(node); ctrl->ngd = ngd; ret = platform_device_add(ngd->pdev);