Skip to content

Commit

Permalink
V4L/DVB(12993b): gl860: Prevent a potential risk of zeroing a floatin…
Browse files Browse the repository at this point in the history
…g 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: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Sep 19, 2009
1 parent ab20585 commit 0030ec3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/gspca/gl860/gl860.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 0030ec3

Please sign in to comment.