]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
V4L/DVB(12993b): gl860: Prevent a potential risk of zeroing a floating pointer
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Sep 2009 03:49:11 +0000 (00:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Sep 2009 03:49:11 +0000 (00:49 -0300)
drivers/media/video/gspca/gl860/gl860.c: In function ‘gl860_build_control_table’:
drivers/media/video/gspca/gl860/gl860.c:119: warning: ‘sd_ctrls’ may be used uninitialized in this function

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gl860/gl860.c

index 62f4320fd9d8089594d3ed68bed4ee86fe4d3227..6ef59ac7f502c985bd881c3b876dd215daa10bb4 100644 (file)
@@ -129,6 +129,8 @@ static int gl860_build_control_table(struct gspca_dev *gspca_dev)
                sd_ctrls = sd_ctrls_ov2640;
        else if (_OV9655_)
                sd_ctrls = sd_ctrls_ov9655;
+       else
+               return 0;
 
        memset(sd_ctrls, 0, GL860_NCTRLS * sizeof(struct ctrl));