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 BF4D737DADD for ; Mon, 15 Jun 2026 15:52:18 +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=1781538739; cv=none; b=pfyMnb3qXmSj+EvdWcgIldk8JGuM/kA6LD8b52uHkyQH341DEswdH/XVKLc34hSnmIZZnMZw1Uqd4VwRB4rQku3iYs0HibCarPvCg8676L9T4wogMISm517n52HSEEsX99iKqzOj6U8C1QaudY8+YGD07H4asHhyxbut7EP7yoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781538739; c=relaxed/simple; bh=d3T0N5ViIegA8gGv9U1H3GGcbuJ55e1/+DVWB/gcLQM=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=SFdXi+taLF9NmnV2UGNDvv54v01CsAgBV1j0hVoA/miAUJVvKVsXY0Iu8yxn+RuZb93cT2l57l3uJ3PpNkYU1Ffxa5BpDMZVTKL1N1sQyRi3aTTp2UeEEumxS3L7rufegSshwhdybKXrtSs/azQGFXQrwKVyx2zPle1QDGJTlSU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gc5Th3RJ; 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="gc5Th3RJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 898E11F000E9; Mon, 15 Jun 2026 15:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781538738; bh=D8mEVo5exVOoHnD2E6U5bs68vk512X0nWzp089d0v1Y=; h=Subject:To:Cc:From:Date; b=gc5Th3RJXd0GLnLoSPU/6bx7lpQhn8oHO/13ULJgI2qYRZ6toGTKlva2f689Mcn8O pSRs9GVsY8cT7YxLVv7Wew2y7uhNr2kQ6OOp/Tphkd2FvscKJbZavZc3bLwbdasWh9 ZlejykmOCmS9Do3nA5gJpKPmR0Z/I8Nd5gUiKgQg= Subject: FAILED: patch "[PATCH] slimbus: qcom-ngd-ctrl: Fix up platform_driver registration" failed to apply to 5.15-stable tree To: bjorn.andersson@oss.qualcomm.com,dmitry.baryshkov@oss.qualcomm.com,gregkh@linuxfoundation.org,mukesh.ojha@oss.qualcomm.com,srini@kernel.org Cc: From: Date: Mon, 15 Jun 2026 17:46:22 +0200 Message-ID: <2026061522-crib-retract-1312@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-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 . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x 8663e8334d7b6007f5d8a4e5dd270246f35107a6 # git commit -s git send-email --to '' --in-reply-to '2026061522-crib-retract-1312@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 8663e8334d7b6007f5d8a4e5dd270246f35107a6 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sat, 30 May 2026 21:44:15 +0100 Subject: [PATCH] slimbus: qcom-ngd-ctrl: Fix up platform_driver registration Device drivers should not invoke platform_driver_register()/unregister() in their probe and remove paths. They should further not rely on platform_driver_unregister() as their only means of "deleting" their child devices. Introduce a helper to unregister the child device and move the platform_driver_register()/unregister() to module_init()/exit(). Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Cc: stable@vger.kernel.org Reviewed-by: Dmitry Baryshkov Reviewed-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20260530204421.116824-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 428266949fdd..47ba9fb34d25 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1560,6 +1560,13 @@ static int of_qcom_slim_ngd_register(struct device *parent, return -ENODEV; } +static void qcom_slim_ngd_unregister(struct qcom_slim_ngd_ctrl *ctrl) +{ + struct qcom_slim_ngd *ngd = ctrl->ngd; + + platform_device_del(ngd->pdev); +} + static int qcom_slim_ngd_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1662,7 +1669,6 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) goto err_pdr_lookup; } - platform_driver_register(&qcom_slim_ngd_driver); return of_qcom_slim_ngd_register(dev, ctrl); err_pdr_alloc: @@ -1676,7 +1682,9 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) static void qcom_slim_ngd_ctrl_remove(struct platform_device *pdev) { - platform_driver_unregister(&qcom_slim_ngd_driver); + struct qcom_slim_ngd_ctrl *ctrl = platform_get_drvdata(pdev); + + qcom_slim_ngd_unregister(ctrl); } static void qcom_slim_ngd_remove(struct platform_device *pdev) @@ -1752,6 +1760,28 @@ static struct platform_driver qcom_slim_ngd_driver = { }, }; -module_platform_driver(qcom_slim_ngd_ctrl_driver); +static int qcom_slim_ngd_init(void) +{ + int ret; + + ret = platform_driver_register(&qcom_slim_ngd_driver); + if (ret) + return ret; + + ret = platform_driver_register(&qcom_slim_ngd_ctrl_driver); + if (ret) + platform_driver_unregister(&qcom_slim_ngd_driver); + + return ret; +} + +static void qcom_slim_ngd_exit(void) +{ + platform_driver_unregister(&qcom_slim_ngd_ctrl_driver); + platform_driver_unregister(&qcom_slim_ngd_driver); +} + +module_init(qcom_slim_ngd_init); +module_exit(qcom_slim_ngd_exit); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Qualcomm SLIMBus NGD controller");