[PATCH 5.10 359/491] Revert "media: dvb-frontends: w7090p: fix null-ptr-deref in w7090p_tuner_write_serpar and w7090p_tuner_read_serpar"

Greg Kroah-Hartman
2026-04-13T16:58:06Z

This reverts commit b3d77a3fc71c084575d3df4ec6544b3fb6ce587d.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/dvb-frontends/dib7000p.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/media/dvb-frontends/dib7000p.c b/drivers/media/dvb-frontends/dib7000p.c
index 08b3ac8ff1083..a4d060fb1babd 100644
--- a/drivers/media/dvb-frontends/dib7000p.c
+++ b/drivers/media/dvb-frontends/dib7000p.c
@@ -2198,8 +2198,6 @@ static int w7090p_tuner_write_serpar(struct i2c_adapter *i2c_adap, struct i2c_ms
struct dib7000p_state *state = i2c_get_adapdata(i2c_adap);
u8 n_overflow = 1;
u16 i = 1000;
- if (msg[0].len < 3)
- return -EOPNOTSUPP;
u16 serpar_num = msg[0].buf[0];

while (n_overflow == 1 && i) {
@@ -2219,8 +2217,6 @@ static int w7090p_tuner_read_serpar(struct i2c_adapter *i2c_adap, struct i2c_msg
struct dib7000p_state *state = i2c_get_adapdata(i2c_adap);
u8 n_overflow = 1, n_empty = 1;
u16 i = 1000;
- if (msg[0].len < 1 || msg[1].len < 2)
- return -EOPNOTSUPP;
u16 serpar_num = msg[0].buf[0];
u16 read_word;

--
2.53.0