[media] lgdt330x: warn on errors blasting modulation config to the lgdt3303
authorMichael Krufky <mkrufky@linuxtv.org>
Thu, 15 Dec 2011 13:30:38 +0000 (10:30 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 30 Dec 2011 17:58:01 +0000 (15:58 -0200)
fix the following build warning:

lgdt330x.c: In function "lgdt330x_set_parameters":
lgdt330x.c:346:6: warning: variable "err" set but not used
[-Wunused-but-set-variable]

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/lgdt330x.c

index d45827158a24a709166638275f6585a001a387de..c39d8d63979b870582050bd3b0c02c767e97dda9 100644 (file)
@@ -347,7 +347,7 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe,
 
        static u8 top_ctrl_cfg[]   = { TOP_CONTROL, 0x03 };
 
-       int err;
+       int err = 0;
        /* Change only if we are actually changing the modulation */
        if (state->current_modulation != param->u.vsb.modulation) {
                switch(param->u.vsb.modulation) {
@@ -402,6 +402,11 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe,
                        printk(KERN_WARNING "lgdt330x: %s: Modulation type(%d) UNSUPPORTED\n", __func__, param->u.vsb.modulation);
                        return -1;
                }
+               if (err < 0)
+                       printk(KERN_WARNING "lgdt330x: %s: error blasting "
+                              "bytes to lgdt3303 for modulation type(%d)\n",
+                              __func__, param->u.vsb.modulation);
+
                /*
                 * select serial or parallel MPEG harware interface
                 * Serial:   0x04 for LGDT3302 or 0x40 for LGDT3303