From nobody Tue Apr 7 11:15:20 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 AB8B837CD33 for ; Fri, 13 Mar 2026 15:55:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773417344; cv=none; b=hkgem+3KNRX+UD0rpHPzsBlKi9U5THPD/HQ0FjphxfGsgzoVD6Ngux+QFlV/KNp5PG+mRmgpvT1GegV9pHQUmh4Oax7gim4GN11F39lOnW1/h/etY0GP5U3t+mv0cokc6B+5c0vSGDGjhueJ71NrGl2dfi0a6hQwZhIGOo7Pn+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773417344; c=relaxed/simple; bh=fr4IVjNPf2Eeer6PP5mDcnQz6+gULEMSleWbr5WJIdc=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=LfPEpF0wCLtNWKudFfyxb/EwzEaKpb2gU+0kVTqavyNdGFAHEMoCtJ6npIVTwy1aWTdA2EiV1f2zjnWE5RglXgRZnBT7nHTCljXawr1+UjyYzaPhkqIyh6rA8v98U/m4/tapyPgs8Tx0FJoyJ4AlypMp7awV90Z6TPyNBglpr+A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--smostafa.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ahkIQnv+; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--smostafa.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ahkIQnv+" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-48534941525so26777935e9.2 for ; Fri, 13 Mar 2026 08:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773417337; x=1774022137; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=/2njJFxnimdUchpgiiU3jhGWTXD4ortpxvxhrp4ZuJY=; b=ahkIQnv+fzp/9b/2NAH1iQ2ZNUZl4W/bQ+S4fd7wryqVL+IpK6H1lKS1uMnI+0Nqi8 nztMYs7yI4bWRZIYYpLYosRwkyrZrUakEInmu6VhRsspNylYx5gEYwGa+kvepqbJBlHH k67ay324xWgjKWC2Y1/5rv2JrAuOYhefeBYk+NwCG24BsTA1WEj0Vp/4TSGcX8xaNXKd QvCjKH+uW0naItkcSApd/d63RCcOGHAO2wXIHmGHde9f3TX53f/W9SC1OkggjpKhfwTe k/KfJA41R5rhwa7iPIdzPq21f8HJEGbjN98TEazCTrsHHgoFC0Tg5a1NG/zu09+GnnxU RBkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773417337; x=1774022137; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/2njJFxnimdUchpgiiU3jhGWTXD4ortpxvxhrp4ZuJY=; b=aQYY/alAQnLiLq5JMQSSuhyyE0D6eWpD1EHv71alZ4q8mDEzJNhF1WNN99+VlFvFMs W6TqBxI2yGxR5IQbn6mFEY5VcCAaGadySrBWNiQXIgWE3hJhG/MSgQMLvgb9mvBGWS9w 1T8lCfvQftyv2234VEzOwyFE/sHN0fEppXrANgr0/tpsEvoCg7pXwKRGQZhug33R2Y1q Hib4p9PeQC2poIaZEfLVp4UuTYT48iGsA3kWoPB5BupBrfu4zEN9K/KMQcNxEb5/mC5f OcsapFgKz22MJjTulQXbhif2mobFEyvJhPNsjUQBXsONwdhzoWycUD9cd5vKs+8uDphE xSRQ== X-Forwarded-Encrypted: i=1; AJvYcCUKt5vAl96ifsb0J7DDfGf9KcXAv7+r0J6gNDEUGDaR77IIL7jFEPi0vUxf0iHzzr7rG+S9U90ruaSWfE8=@vger.kernel.org X-Gm-Message-State: AOJu0YxS+0Uh2G7OSlosxaTjhr2x8iqlV4hqDIZ94R0phFcWf9gg8/EA ma+iylEr4n/3uIy3Hdb9VraXJVOhaxmeLLiE4hvPqNsUIm8k3qhW0iq5rTFs+Bdjr96y24aTgjR ZRypqMG/Ns1sUlQ== X-Received: from wmqj8.prod.google.com ([2002:a05:600c:1908:b0:485:1ee9:c5de]) (user=smostafa job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1f8d:b0:485:4278:24fb with SMTP id 5b1f17b1804b1-48556711dfcmr61632175e9.32.1773417337265; Fri, 13 Mar 2026 08:55:37 -0700 (PDT) Date: Fri, 13 Mar 2026 15:55:34 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.53.0.851.ga537e3e6e9-goog Message-ID: <20260313155534.1916773-1-smostafa@google.com> Subject: [PATCH] usb: typec: ps883x: Fix Oops at unbind From: Mostafa Saleh To: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, konrad.dybcio@oss.qualcomm.com, jack.pham@oss.qualcomm.com, Mostafa Saleh Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When trying to unbind a device in order to bind to it vfio-platform as: echo bc0000.geniqup > /sys/bus/platform/devices/bc0000.geniqup/driver/un= bind I get the following Oops: [ 436.478639] Unable to handle kernel NULL pointer dereference at virtual = address 0000000000000020 [ 436.487762] Mem abort info: [ 436.490716] ESR =3D 0x0000000096000004 [ 436.494595] EC =3D 0x25: DABT (current EL), IL =3D 32 bits [ 436.500071] SET =3D 0, FnV =3D 0 [ 436.503250] EA =3D 0, S1PTW =3D 0 [ 436.506505] FSC =3D 0x04: level 0 translation fault [ 436.511533] Data abort info: [ 436.514558] ISV =3D 0, ISS =3D 0x00000004, ISS2 =3D 0x00000000 [ 436.520215] CM =3D 0, WnR =3D 0, TnD =3D 0, TagAccess =3D 0 [ 436.525436] GCS =3D 0, Overlay =3D 0, DirtyBit =3D 0, Xs =3D 0 [ 436.530918] user pgtable: 4k pages, 48-bit VAs, pgdp=3D00000008861a9000 [ 436.537554] [0000000000000020] pgd=3D0000000000000000, p4d=3D00000000000= 00000 [ 436.544548] Internal error: Oops: 0000000096000004 [#1] SMP [ 436.550374] Modules linked in: [ 436.553542] CPU: 2 UID: 0 PID: 671 Comm: bash Tainted: G W = 7.0.0-rc3-g56fcdd0911a5-dirty #2 PREEMPT [ 436.564440] Tainted: [W]=3DWARN [ 436.567515] Hardware name: LENOVO 91B6CTO1WW/3796, BIOS O6NKT3BA 05/02/2= 025 [ 436.574675] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE= =3D--) [ 436.581841] pc : ps883x_retimer_remove+0x14/0x94 [ 436.586605] lr : i2c_device_remove+0x28/0x84 [ 436.591017] sp : ffff8000847137c0 That's because the ps883x_retimer_remove() retrieves the driver data from i2c_get_clientdata() which was never set at probe. So, add i2c_set_clientdata() at the end of the probe. Signed-off-by: Mostafa Saleh Reviewed-by: Konrad Dybcio --- drivers/usb/typec/mux/ps883x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c index 5f2879749769..1256252eceed 100644 --- a/drivers/usb/typec/mux/ps883x.c +++ b/drivers/usb/typec/mux/ps883x.c @@ -444,6 +444,7 @@ static int ps883x_retimer_probe(struct i2c_client *clie= nt) goto err_switch_unregister; } =20 + i2c_set_clientdata(client, retimer); return 0; =20 err_switch_unregister: --=20 2.53.0.851.ga537e3e6e9-goog