aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/af9015.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/af9015.c')
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 0bfe83b63e01..41a7c430f9c1 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -292,6 +292,10 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
292 } 292 }
293 293
294 if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) { 294 if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) {
295 if (msg[i].len > 3 || msg[i+1].len > 61) {
296 ret = -EOPNOTSUPP;
297 goto error;
298 }
295 if (msg[i].addr == 299 if (msg[i].addr ==
296 af9015_af9013_config[0].demod_address) 300 af9015_af9013_config[0].demod_address)
297 req.cmd = READ_MEMORY; 301 req.cmd = READ_MEMORY;
@@ -306,6 +310,10 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
306 ret = af9015_ctrl_msg(d, &req); 310 ret = af9015_ctrl_msg(d, &req);
307 i += 2; 311 i += 2;
308 } else if (msg[i].flags & I2C_M_RD) { 312 } else if (msg[i].flags & I2C_M_RD) {
313 if (msg[i].len > 61) {
314 ret = -EOPNOTSUPP;
315 goto error;
316 }
309 if (msg[i].addr == 317 if (msg[i].addr ==
310 af9015_af9013_config[0].demod_address) { 318 af9015_af9013_config[0].demod_address) {
311 ret = -EINVAL; 319 ret = -EINVAL;
@@ -321,6 +329,10 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
321 ret = af9015_ctrl_msg(d, &req); 329 ret = af9015_ctrl_msg(d, &req);
322 i += 1; 330 i += 1;
323 } else { 331 } else {
332 if (msg[i].len > 21) {
333 ret = -EOPNOTSUPP;
334 goto error;
335 }
324 if (msg[i].addr == 336 if (msg[i].addr ==
325 af9015_af9013_config[0].demod_address) 337 af9015_af9013_config[0].demod_address)
326 req.cmd = WRITE_MEMORY; 338 req.cmd = WRITE_MEMORY;