summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-19 00:50:59 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-19 00:50:59 -0300
commit7e64172778f38790cb77a147a6448a7816628fdf (patch)
tree75cd1d33ba9bf7c354f75a2450400b5380641b69
parent110696025ea941774963a9e9add428865bf18350 (diff)
downloadmediapointer-dvb-s2-7e64172778f38790cb77a147a6448a7816628fdf.tar.gz
mediapointer-dvb-s2-7e64172778f38790cb77a147a6448a7816628fdf.tar.bz2
backport commit 0030ec38ce5b50a77287a22bf88a65338da21547
From: Mauro Carvalho Chehab <mchehab@redhat.com> Author: Mauro Carvalho Chehab <mchehab@redhat.com> Date: Sat Sep 19 00:49:11 2009 -0300 V4L/DVB(12993b): gl860: Prevent a potential risk of zeroing a floating pointer 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 kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--linux/drivers/media/video/gspca/gl860/gl860.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/gl860/gl860.c b/linux/drivers/media/video/gspca/gl860/gl860.c
index 62f4320fd..6ef59ac7f 100644
--- a/linux/drivers/media/video/gspca/gl860/gl860.c
+++ b/linux/drivers/media/video/gspca/gl860/gl860.c
@@ -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));