[media] drxk: Return -EINVAL if an invalid bandwidth is used
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 3 Jul 2011 21:18:14 +0000 (18:18 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:55:45 +0000 (17:55 -0300)
drivers/media/dvb/frontends/drxk_hard.c: In function ‘SetDVBT’:
drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_5_MHZ’ not handled in switch
drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_10_MHZ’ not handled in switch
drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_1_712_MHZ’ not handled in switch

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/drxk_hard.c

index f2c5a92616086dfbf4af8e2ba0df24970b7b9faf..f7ae900811149ba81d1b0858ae9d8ae4b8a4cbff 100644 (file)
@@ -3822,6 +3822,8 @@ static int SetDVBT(struct drxk_state *state, u16 IntermediateFreqkHz,
                        if (status < 0)
                                break;
                        break;
+               default:
+                       return -EINVAL;
                }
 
                if (iqmRcRateOfs == 0) {