aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-01-10 18:46:26 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-10 19:58:55 -0500
commitdab734ec95168488c4b32632e968ce885a083078 (patch)
tree2462b0f176f0d2dcc10ec93d29007db32426ff4b /drivers/media
parentb748e6a91e136a582943a496eac40071a23beff3 (diff)
[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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/frontends/hd29l2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/hd29l2.c b/drivers/media/dvb/frontends/hd29l2.c
index 9959a5abb53..a0031819083 100644
--- a/drivers/media/dvb/frontends/hd29l2.c
+++ b/drivers/media/dvb/frontends/hd29l2.c
@@ -30,7 +30,7 @@ MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
30static int hd29l2_wr_regs(struct hd29l2_priv *priv, u8 reg, u8 *val, int len) 30static int hd29l2_wr_regs(struct hd29l2_priv *priv, u8 reg, u8 *val, int len)
31{ 31{
32 int ret; 32 int ret;
33 u8 buf[2+len]; 33 u8 buf[2 + len];
34 struct i2c_msg msg[1] = { 34 struct i2c_msg msg[1] = {
35 { 35 {
36 .addr = priv->cfg.i2c_addr, 36 .addr = priv->cfg.i2c_addr,
@@ -476,7 +476,7 @@ static enum dvbfe_search hd29l2_search(struct dvb_frontend *fe)
476 476
477 /* ensure modulation validy */ 477 /* ensure modulation validy */
478 /* 0=QAM4_NR, 1=QAM4, 2=QAM16, 3=QAM32, 4=QAM64 */ 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 dbg("%s: modulation=%d not valid", __func__, modulation); 480 dbg("%s: modulation=%d not valid", __func__, modulation);
481 goto err; 481 goto err;
482 } 482 }
@@ -735,7 +735,7 @@ static int hd29l2_init(struct dvb_frontend *fe)
735 /* reset demod */ 735 /* reset demod */
736 /* it is recommended to HW reset chip using RST_N pin */ 736 /* it is recommended to HW reset chip using RST_N pin */
737 if (fe->callback) { 737 if (fe->callback) {
738 ret = fe->callback(fe, 0, 0, 0); 738 ret = fe->callback(fe, DVB_FRONTEND_COMPONENT_DEMOD, 0, 0);
739 if (ret) 739 if (ret)
740 goto err; 740 goto err;
741 741