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 9C01744D035; Tue, 16 Jun 2026 15:39:41 +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=1781624382; cv=none; b=DEolfhcMRDiCqPf6u1Dae7UHjNVPvqjyeDXzr/UCrRju2RAEHnToWCcvQdcLRqlgGSTf8sZnf5sEo5kHnvz2T1myWJjiVMtKjtpm4w+Vwg1ZS5d7VadQzjToEs7GtaCIboYjMa1Nq9qOqzHCiQH3FXhmIfLJdUkN+8/b2ph/arE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781624382; c=relaxed/simple; bh=taoqp8r03U1N5JwnDFKRBKNTQEr/biOmgwz7E+wI+Gw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EjKOL9OqOI9pNBI6CqtTpGQpCFBQ65AZSPLNxffu+79+NOtYlBgX+0rULejXo/JR0v5Ex4ZDtQi4mYtOccO/W2gks+LsfdSPJ4iSs4xTfIwvGC7P577caltB6GNjMj88veQhdaM7hIbXxCEaPlYFQ7f31mYwDfahyDx616p+TCk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mzm+/Wgr; 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="mzm+/Wgr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87E0D1F000E9; Tue, 16 Jun 2026 15:39:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781624381; bh=wSvHEJfxjGNpAuaUrgLH0DnotJ9h91EkVGRcNs3lKiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mzm+/Wgr2149aEeOh7QSpoZKQEko4x9+jZu+H8y8Iy4fyiOp9BUucJ099CWoWvEMl A2TtNFdWC7rYudjgHqMSOQtQiz0mDh00XkldAR1191nusb2Qzfy5pv/XsJesCg4SMv 6xlcIgeckG7H3Riqxn4LDzleILsai3EiF5ysOe8I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bartosz Golaszewski , Srinivas Kandagatla Subject: [PATCH 7.0 325/378] slimbus: qcom-ngd-ctrl: fix OF node refcount Date: Tue, 16 Jun 2026 20:29:16 +0530 Message-ID: <20260616145127.336087601@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145109.744539446@linuxfoundation.org> References: <20260616145109.744539446@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 7.0-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 @@ -1542,7 +1542,7 @@ static int of_qcom_slim_ngd_register(str kfree(ngd); 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);