Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] hd29l2: fix review findings

Fix some issues pointed out by Mauro.
Mauro Carvalho Chehab <mchehab@redhat.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Antti Palosaari and committed by
Mauro Carvalho Chehab
dab734ec b748e6a9

+3 -3
+3 -3
drivers/media/dvb/frontends/hd29l2.c
··· 30 30 static int hd29l2_wr_regs(struct hd29l2_priv *priv, u8 reg, u8 *val, int len) 31 31 { 32 32 int ret; 33 - u8 buf[2+len]; 33 + u8 buf[2 + len]; 34 34 struct i2c_msg msg[1] = { 35 35 { 36 36 .addr = priv->cfg.i2c_addr, ··· 476 476 477 477 /* ensure modulation validy */ 478 478 /* 0=QAM4_NR, 1=QAM4, 2=QAM16, 3=QAM32, 4=QAM64 */ 479 - if (modulation > 4) { 479 + if (modulation > (ARRAY_SIZE(reg_mod_vals_tab[0].val) - 1)) { 480 480 dbg("%s: modulation=%d not valid", __func__, modulation); 481 481 goto err; 482 482 } ··· 735 735 /* reset demod */ 736 736 /* it is recommended to HW reset chip using RST_N pin */ 737 737 if (fe->callback) { 738 - ret = fe->callback(fe, 0, 0, 0); 738 + ret = fe->callback(fe, DVB_FRONTEND_COMPONENT_DEMOD, 0, 0); 739 739 if (ret) 740 740 goto err; 741 741