From nobody Sat Jul 25 21:20:57 2026 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49C2B3ECBD9 for ; Mon, 13 Jul 2026 11:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783943243; cv=none; b=IoRy1ZiLGU1K3zUXnaepAfyEjoXyy1AX1GxtatCfMMgYkOHJouIsPqnEedJFvxhar0abg9RkkC2Eh5LVHqVvg+dUus4S0lmDQA2xWgs4JqpyDL9TCyjfJ8EiN5V+TjgFYwEbqtC/JxHhP9nwrkhIKdh/UpRyskrAy2t2oDrXKS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783943243; c=relaxed/simple; bh=2PYYlcQqLMp9ZyJlbZOu82v9vXV7Vz57pJlWzajpaQA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EYzxzlquv85+mCsawf2M1MRqLcn73Bjh/qSU7qcxrrdwhlEk5mP1Cr/Y30Np4T/nrNsPpYbOU/cjEtPrOLTDRtFePsriakjveF6GxF+CPIoI6U7xvi9yByGE6uzXS5+W+ZUah2pVftCjLIJN25gXcOP5qotWzHfqpkdAWFHmNJE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OnV4iBuD; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OnV4iBuD" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2ceb096e675so17556115ad.0 for ; Mon, 13 Jul 2026 04:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783943242; x=1784548042; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=gUfgeiYLj2n8Lc+2ZjQf7Ijb1oRUUAQYlVMDWkCBke4=; b=OnV4iBuD6vqmyda6BKuAYbiz5O3cYerXGCh4v4RcNbhkOmIGOPY32Oc5pWhQVfAozI EPzb3IOxP+7n9QgTgTt+6xt6XgaQAMjcaqezxGIwcE2RGQ3hrHuUTMCM8wiLoajgDKOn /BKWCJrEAmCTv0rt/4GghFbz4jy3NMc3fPmeSPSFJ2kWCCRxQFuDSvHTAC7Tig3KV5/X vjHkrQ6SdXzrz1wm7k4myX+mVkwRErqi4mdiRSj4c2l9PEO2nt6w/dEiOhSBhtaUGYdg 4GQePgOP5u4nl1y3AiGkk+i9ouHSrPO1skwSv7M20sn3yhg/ew102pSCfoA73fpQnXxM PV8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783943242; x=1784548042; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gUfgeiYLj2n8Lc+2ZjQf7Ijb1oRUUAQYlVMDWkCBke4=; b=IP0yGzt0Tr91iyTT1NBrShqopLS/Q2inv4p9iCCr9vrZ4FabvTrgt0EcSga9crETJt 56ZDoLDFjchvtyaqG3HZJwWPjerqO0TMNR3cLo4WJXPdE2FS3SK+W2qk1gihcBe1xGP1 i5Iie2jtvvJ44gjRowTvIKZ3dxAEQRCXWtKrW2C9ZAmt1NClzI43IAky2ZUVAvahhzUo oigEdFsr1DLBniy9e7v0nGp23Xv3ArRVyLk0i19KMj+yeU2G9wvqawAf7O4EEAAtw79P l3PIJqNOeb4mGY2q3oXbyYwSnmwz2Uijr2zvdp+c19hBopyDTRhcnZkWxWjzSeeNekT/ Q3fQ== X-Forwarded-Encrypted: i=1; AHgh+RrRnxoHqLAGQRmTg8nRsCQueMGXVO9j2PC9QkhgUIYnOwnqXttlXCVvETIOySGfcVCNnpCDeUKloYYPrpw=@vger.kernel.org X-Gm-Message-State: AOJu0Ywum84RHaBMoEqrhbTbL2BAtxsyBgQ8TzbW0e4nkM40kmnFILEp lfg9YGqVBp0rHY8WZAT71mMKgFfKjg8IlUUXSTvNz83hu0SxwB2Ph3jA X-Gm-Gg: AfdE7cmBMMxlfEhv5ik1+/F5scRaY58vEdQm2yL04t6qDvbP40CCXvttte9BUtENqUE Oaxi5kWRc/N5QWWO5f0zrzlViLE0ThIxASZb2IeNBAj0bLGwxfaX9GFT2kwDTep9XSf2UGe78S3 piT6ndb26NJvX9RTsuVqbSV3QCb35q6hjeMPYnTEr+/iXNE30knPhTwHQq4jLLlIsSF17h0UPhJ 9MGd9FZQGQLl9BcIJo4pKOzOBx9W8YEGIykzsLYheZPyCWhqr5rY/GBujWZrJ3TfagvLpoeV5e3 2wG6UIVQHpRgkZYtu2Ne6EuFf5zC9OHjhYbGu5DSyFxZt20tquj28vh2ofowQX1WrakDwWfa0tF LHiG0uqXj1NMkb13X+WoZb+14PjrkPtCUxvtGVaxsGb/fsTf2AwwQNgX9tK/yD/RTnLw+rCejNV D3h+Ut/QqVEQ== X-Received: by 2002:a17:903:2a88:b0:2cc:6018:f030 with SMTP id d9443c01a7336-2ce9e9b2507mr83806345ad.14.1783943241572; Mon, 13 Jul 2026 04:47:21 -0700 (PDT) Received: from lgs.. ([101.76.249.46]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ccc99cc5aasm98328125ad.0.2026.07.13.04.47.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 04:47:21 -0700 (PDT) From: Guangshuo Li To: Bin Liu , Greg Kroah-Hartman , Tony Lindgren , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Guangshuo Li , stable@vger.kernel.org, Johan Hovold Subject: [PATCH v2] usb: musb: omap2430: Do not put borrowed of_node in probe Date: Mon, 13 Jul 2026 19:47:11 +0800 Message-ID: <20260713114711.955253-1-lgs201920130244@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" omap2430_probe() stores pdev->dev.of_node in a local np variable. This is a borrowed pointer and the probe function does not take a reference to it. The success and error paths nevertheless call of_node_put(np). This drops a reference that is owned by the platform device, and can leave pdev->dev.of_node with an unbalanced reference count. Do not put the borrowed platform device node from omap2430_probe(). References taken for the child MUSB device are handled by the device core, and the ctrl-module phandle reference is still released separately. Fixes: ffbe2feac59b ("usb: musb: omap2430: Fix probe regression for missing= resources") Cc: stable@vger.kernel.org Reviewed-by: Johan Hovold Signed-off-by: Guangshuo Li --- v2: - Correct the Fixes tag. - Add Cc stable. - Add Reviewed-by tag from Johan Hovold. - No code changes. drivers/usb/musb/omap2430.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 333ab79f0ca9..6e749faac33c 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -454,7 +454,6 @@ static int omap2430_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to register musb device\n"); goto err_disable_rpm; } - of_node_put(np); =20 return 0; =20 @@ -464,7 +463,6 @@ static int omap2430_probe(struct platform_device *pdev) if (!IS_ERR(glue->control_otghs)) put_device(glue->control_otghs); err_put_musb: - of_node_put(np); platform_device_put(musb); =20 return ret; --=20 2.43.0