From mboxrd@z Thu Jan 1 00:00:00 1970 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 20E9D31DDA5 for ; Thu, 21 Aug 2025 12:44:35 +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=1755780276; cv=none; b=UY+kNWuQVT71VE2525DaFTvffXSZuFz6DsHhg1Hm9lIcMapDk60EhLOa4ebRgpvdKxR62hTfVddOPSiySZoaRKhbjWMF+0za5ZD8HoFGuJ2rimEJYkPyzEmFSbDGtuLP1je4DVhAXe0o98MetWf9dSJPiCfVCSgk97/YYUm0tlg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755780276; c=relaxed/simple; bh=QWKNyevn67oG4clqh54OJksxRtYE9M64qvmr/0HhAGE=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=CL2I9xooHaVE8HyQ+5BMjc/WdA8Tb401ruQTsQhwmq9yei7DHTMP3Bk3rvnkwPbKEogKYQBVmf+8+Hq/EWEWnZ0KDl9j8ytzlGCiQ/4dM1Qs2pFoo9UGASjNRp9/nGv7yRds7hsx+kQOe0dnOMtkr5QcbpdG+7EqrzkQeyK9+dw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=w6l/St0+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="w6l/St0+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C62CC4CEEB; Thu, 21 Aug 2025 12:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755780275; bh=QWKNyevn67oG4clqh54OJksxRtYE9M64qvmr/0HhAGE=; h=Subject:To:Cc:From:Date:From; b=w6l/St0+Tg0MLLTiLQoS0vvafOqo5QKY+6YHIAlL3fKDd0vbMiBO5YlFG7UT9obqy Y8kPnp9hamvlSg99GD2LuUCg3TllxozWs3mRQTwEgoy+tlPs+KN1Qy3BNS7BecIo0q DC8sk7v2dsmrj67VzkzSszEH5OKuR3QFM5D1dKtk= Subject: FAILED: patch "[PATCH] usb: dwc3: imx8mp: fix device leak at unbind" failed to apply to 5.15-stable tree To: johan@kernel.org,gregkh@linuxfoundation.org,jun.li@nxp.com Cc: From: Date: Thu, 21 Aug 2025 14:44:21 +0200 Message-ID: <2025082121-magician-conceal-4df0@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 086a0e516f7b3844e6328a5c69e2708b66b0ce18 # git commit -s git send-email --to '' --in-reply-to '2025082121-magician-conceal-4df0@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 086a0e516f7b3844e6328a5c69e2708b66b0ce18 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 24 Jul 2025 11:19:06 +0200 Subject: [PATCH] usb: dwc3: imx8mp: fix device leak at unbind Make sure to drop the reference to the dwc3 device taken by of_find_device_by_node() on probe errors and on driver unbind. Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver") Cc: stable@vger.kernel.org # 5.12 Cc: Li Jun Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20250724091910.21092-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index 3edc5aca76f9..bce6af82f54c 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -244,7 +244,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) IRQF_ONESHOT, dev_name(dev), dwc3_imx); if (err) { dev_err(dev, "failed to request IRQ #%d --> %d\n", irq, err); - goto depopulate; + goto put_dwc3; } device_set_wakeup_capable(dev, true); @@ -252,6 +252,8 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) return 0; +put_dwc3: + put_device(&dwc3_imx->dwc3->dev); depopulate: of_platform_depopulate(dev); remove_swnode: @@ -265,8 +267,11 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) static void dwc3_imx8mp_remove(struct platform_device *pdev) { + struct dwc3_imx8mp *dwc3_imx = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; + put_device(&dwc3_imx->dwc3->dev); + pm_runtime_get_sync(dev); of_platform_depopulate(dev); device_remove_software_node(dev);