提交 0030ec38 编写于 作者: M Mauro Carvalho Chehab

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
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 ab205857
...@@ -129,6 +129,8 @@ static int gl860_build_control_table(struct gspca_dev *gspca_dev) ...@@ -129,6 +129,8 @@ static int gl860_build_control_table(struct gspca_dev *gspca_dev)
sd_ctrls = sd_ctrls_ov2640; sd_ctrls = sd_ctrls_ov2640;
else if (_OV9655_) else if (_OV9655_)
sd_ctrls = sd_ctrls_ov9655; sd_ctrls = sd_ctrls_ov9655;
else
return 0;
memset(sd_ctrls, 0, GL860_NCTRLS * sizeof(struct ctrl)); memset(sd_ctrls, 0, GL860_NCTRLS * sizeof(struct ctrl));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册