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 C99FE26ED41; Fri, 9 Jan 2026 12:20:13 +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=1767961213; cv=none; b=RSBlXF0THZsCrET15wEgHYaNewFSrTViTa9BI1yGWhdAuo7HNmNZoXI260LRx7rcUT2Dx1xe5kUZD3E1SNcjZZhMmQG9fQHeoN0zpOkkdOw530bJo/zcBD1aJ/cqdkN+ovUgg78W4NlBsXtZuO0PLCtr7b7Fwxb3XuHGEgu6Ubk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767961213; c=relaxed/simple; bh=+jMQWVdJEQIPIMqfAIdu12RddL4jogwIQSrH+sg4DNk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PrKvUX5/jIYjZvB7BjDOE9RR6rEvrcqmSf3nXUQQQr8qN050XH2uBXGBHTFkqy42hBDYRa6K+rdOJISOQXmucRKtONZ1A6Iwg5yO9qQjLiaIz/wErqQA5at3t9Ml5y0uA1VqUbboNvHysUwCg4bgHGKjemp8FKjmT+N5NQL1UVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X7hZ9rVs; 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="X7hZ9rVs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57EADC4CEF1; Fri, 9 Jan 2026 12:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767961213; bh=+jMQWVdJEQIPIMqfAIdu12RddL4jogwIQSrH+sg4DNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X7hZ9rVs30BmuidM7fApqMPwpV+FF6/sUFcO1WIFFEkeKlzBGWK6f7bQaA14jg/ee i6UwP0LMe2ERK+5D/cwHSb77rJ0a3Cl4cLjnFJWSEAraSUDgkcHOHOFJrdHn9gvIZl OkOYcm7+IXnyYHSCKGaDVjtZzIhe0uUwoN7smWXI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ma Ke , Johan Hovold , Alan Stern , Vladimir Zapolskiy , Sasha Levin Subject: [PATCH 6.6 642/737] usb: ohci-nxp: fix device leak on probe failure Date: Fri, 9 Jan 2026 12:43:01 +0100 Message-ID: <20260109112158.164107480@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112133.973195406@linuxfoundation.org> References: <20260109112133.973195406@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold [ Upstream commit b4c61e542faf8c9131d69ecfc3ad6de96d1b2ab8 ] Make sure to drop the reference taken when looking up the PHY I2C device during probe on probe failure (e.g. probe deferral) and on driver unbind. Fixes: 73108aa90cbf ("USB: ohci-nxp: Use isp1301 driver") Cc: stable@vger.kernel.org # 3.5 Reported-by: Ma Ke Link: https://lore.kernel.org/lkml/20251117013428.21840-1-make24@iscas.ac.cn/ Signed-off-by: Johan Hovold Acked-by: Alan Stern Reviewed-by: Vladimir Zapolskiy Link: https://patch.msgid.link/20251218153519.19453-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-nxp.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c @@ -223,6 +223,7 @@ static int ohci_hcd_nxp_probe(struct pla fail_resource: usb_put_hcd(hcd); fail_disable: + put_device(&isp1301_i2c_client->dev); isp1301_i2c_client = NULL; return ret; } @@ -234,6 +235,7 @@ static void ohci_hcd_nxp_remove(struct p usb_remove_hcd(hcd); ohci_nxp_stop_hc(); usb_put_hcd(hcd); + put_device(&isp1301_i2c_client->dev); isp1301_i2c_client = NULL; }