From: Duncan Sands Date: Thu, 9 Mar 2006 14:20:14 +0000 (-0300) Subject: V4L/DVB (3420): Nskips maybe used uninitialized in bttv_risc_overlay X-Git-Tag: v2.6.17-rc1~1183^2~47 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99ca99915068806552d1f90ce50bed4c7387d65a;p=linux-2.6 V4L/DVB (3420): Nskips maybe used uninitialized in bttv_risc_overlay The Coverity checker (previously Stanford checker) noticed that the value of nskips could be read even if it was never written. Signed-off-by: Duncan Sands Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c index a60c211c9e..5c746110df 100644 --- a/drivers/media/video/bttv-risc.c +++ b/drivers/media/video/bttv-risc.c @@ -276,6 +276,8 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc, if (line > maxy) btcx_calc_skips(line, ov->w.width, &maxy, skips, &nskips, ov->clips, ov->nclips); + else + nskips = 0; /* write out risc code */ for (start = 0, skip = 0; start < ov->w.width; start = end) {