[PATCH 2/2] media: m88ds3103: reject 3103C chip id for other bindings
From: YuanZhe Liu
Date: Fri Dec 04 2026 - 02:32:27 EST
m88ds3103_probe() accepts the 3103C chip id for every i2c device id, but
only the "m88ds3103b" and "m88ds3103c" bindings create the auxiliary i2c
client for the internal tuner (dt_client). A 3103C chip probed through
the plain "m88ds3103" id therefore ends up with dt_client == NULL, while
m88ds3103_sleep() selects the internal tuner path by chip id and calls
m88ds3103b_dt_write():
general protection fault in m88ds3103b_dt_write
m88ds3103_sleep
dvb_usb_fe_sleep
dvb_frontend_thread
The 3103C chip id is unique to that part, and the 3103C initialization
is only performed for the 3103C binding. Accept it only there; other
bindings get -ENODEV instead of running a partially initialized
frontend.
Fixes: a05d61fe0a9b ("media: m88ds3103: Implement 3103c chip support")
Cc: stable@xxxxxxxxxxxxxxx
Co-developed-by: Bin Yu <byu@xxxxxxxxxxxxx>
Signed-off-by: Bin Yu <byu@xxxxxxxxxxxxx>
Co-developed-by: Cheng Wen <wencheng@xxxxxxxxxxxxx>
Signed-off-by: Cheng Wen <wencheng@xxxxxxxxxxxxx>
Signed-off-by: YuanZhe Liu <25031212351@xxxxxxxxxxxxxxxxx>
---
drivers/media/dvb-frontends/m88ds3103.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c
index d79b88848a8c..40757549fd67 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/drivers/media/dvb-frontends/m88ds3103.c
@@ -2089,8 +2089,15 @@ static int m88ds3103_probe(struct i2c_client *client)
switch (dev->chip_id) {
case M88RS6000_CHIP_ID:
case M88DS3103_CHIP_ID:
- case M88DS3103C_CHIP_ID:
break;
+ case M88DS3103C_CHIP_ID:
+ if (dev->chiptype == M88DS3103_CHIPTYPE_3103C)
+ break;
+ ret = -ENODEV;
+ dev_err(&client->dev,
+ "Chip id 0x%02x requires the m88ds3103c device\n",
+ dev->chip_id);
+ goto err_kfree;
default:
ret = -ENODEV;
dev_err(&client->dev, "Unknown device. Chip_id=%02x\n", dev->chip_id);
--
2.34.1