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 97F783A5E91; Tue, 16 Jun 2026 17:46:01 +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=1781631962; cv=none; b=fvdFS1W961OilTpzsrvBtR8vU5TAukgZrOY9l3HgxrZVoiCUCtPwMtZ2sqfW79ZlqhegS1pWlELAhPd/xWXMhvuVVyVau2vV1LP/NaJTWKO29iz5nG53KoWXMBM1U2GFobq+fo0yUrquRvB31A52E0FBbw641xrBQNlsXBPyCtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781631962; c=relaxed/simple; bh=qW4OGd5B/YyIGK5QuLAM6UT6gGWo9TnatxCnyQMBAxg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sHprkshb0F/+9UEQIDDkMN0QX0pa1ANFGsqpwfgUE7Qw2W937N77Ia3BVxFX4wBx6q/lu46b6RXjj4nwASl9If1nlv3BlHbNPTLhnNOs7myYTarRTbm65PYKVLUCsyIFz6M/UMruXbo+KK0FSdhUT/gVpuXX1T35HT5rbWj1nIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LFgKaKaP; 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="LFgKaKaP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF1701F000E9; Tue, 16 Jun 2026 17:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781631961; bh=Gfe+AoL6MusDWtik4657ZpWd/LEDUcpRXGSreRkaXM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LFgKaKaPjnEvIABKRRSiqMeKTxn/izWHv8xmDdLM/9LUkbx+6njo1arsCkmY5DCVf XGjMaU3cqY7BS6Plc3G2FivDE1n5hxvpqtt1tc6DrnBzLA28DtTZ65WA9flcG886r1 AIYXZW09QTLKAwvOFIH+i8l7eFyL582bp5VoczM0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bartosz Golaszewski , Srinivas Kandagatla Subject: [PATCH 6.1 320/522] slimbus: qcom-ngd-ctrl: fix OF node refcount Date: Tue, 16 Jun 2026 20:27:47 +0530 Message-ID: <20260616145140.826653999@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145125.307082728@linuxfoundation.org> References: <20260616145125.307082728@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: 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 @@ -1472,7 +1472,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);