From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385663; b=K2/Ku9VFG35OxF+JpJg9ajgIzVXDRDHk4GWHUUDHrjTyZQDso8qz8ifXYes29KFP0scx ny2Mw6GW7lGDgVnYLfpceuiHf9UWkjzGg2YOzLWQkFXDUSj5HvVh5O/UYBY5Sr2xnrp74 JQKCzcvLYkOPPb9nE/Ff7qHAd7ogY4aJgi/8AI4OBXuxETQ9Vmd/mdueWK2a50ISGaQhq m9oO7bAGujjAQaYizyepC9EQKRiIBNCfw+fKUPY9gaUueo1CxsluTfQ0QmCTK1DJzFj3/ 8MKINwkC/+H7jGGtqvZJ/M16K5hbMjWWLjYN8NUtSYH/F6ik9SZAQ1qUxAvOxdpxsOw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385663; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=C5Zhs6Ntkoh44KwxsMSTeGrirvYqye9sXyoTKjDBuls=; b=4rDpIoY27fX7ZtnspAcyDt5ZgIguSQtbGeCx6Ec90cmaVyBd+2T4M3Ji50yrLmZ4AnhO xTOnBgih0UxOjRI2mgmklRHMVtrmRxRn685k6YPTVqW6yaHO+YbHHo3zvI0nO+jH8UMnR pKUgYSwTi4hw+Su18x4WL0me093cf7KhcNz2xMmwU0AiGMcZh3mZc7QMhO/kIhf7uVfkO SGwuTPPF3fj3JJ5yvNMpv9PKKVHloCxOw5kf8GPuLIfk6r3GUCwtwhyXvkw8/lcCCe6ZQ aElyIczb5AM0xeO3jUt7Ddo19ajhD925jMTtZVN1vCFiDFZnzeXwX9Kqwnr8m7QkMCw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="Hkq/oz3D"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 908CF606A32C; Fri, 4 Dec 2026 12:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Hkq/oz3D Received: by smtp.kernel.org (Postfix) with ESMTPSA id 089E91F000C2; Fri, 4 Dec 2026 12:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385663; bh=C5Zhs6Ntkoh44KwxsMSTeGrirvYqye9sXyoTKjDBuls=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Hkq/oz3DvhMf6LlVYCRqq/t2zKcgThLRX1eegsgUg+WYAMQFRatxM2b4PfV9qi8aw qAVbrkgSVFJxPmW0B2X1NDpNONQkvRN5WgAp8CgX/H8K2mGRJWVwI15Iv6w+ncznyo XKz79NOGzIzqL1l/V0eJlW+mOkOZ5uwfI+1uccn8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Chaz Bailey , Krishna Kurapati , Heikki Krogerus Subject: [PATCH 6.6 0643/1167] usb: typec: nb7vpq904m: Set client data in probe to avoid crash on remove Date: Fri, 4 Dec 2026 19:01:10 +0900 Message-ID: <20261204100718.809078252@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chaz Bailey commit 2022b10726be78849626ea3fa33038ee96a54e46 upstream. nb7vpq904m_probe() allocates struct nb7vpq904m, but client data is not set during probe. In nb7vpq904m_remove(), i2c_get_clientdata(client) returns NULL, leading to a NULL pointer dereference when accessing nb7->retimer or nb7->sw. Set client data upon successful allocation in probe. Fixes: 88d8f3ac9c67 ("usb: typec: add support for the nb7vpq904m Type-C Linear Redriver") Cc: stable Signed-off-by: Chaz Bailey Reviewed-by: Krishna Kurapati Reviewed-by: Heikki Krogerus Link: https://patch.msgid.link/20261016122045.187862-1-charles.s.bailey@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/mux/nb7vpq904m.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/typec/mux/nb7vpq904m.c +++ b/drivers/usb/typec/mux/nb7vpq904m.c @@ -425,6 +425,7 @@ static int nb7vpq904m_probe(struct i2c_c return -ENOMEM; nb7->client = client; + i2c_set_clientdata(client, nb7); nb7->regmap = devm_regmap_init_i2c(client, &nb7_regmap); if (IS_ERR(nb7->regmap)) {