aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2008-12-30 04:58:36 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 09:40:39 -0200
commit1970f14fde9640cc2e238c031498900edbd8ff94 (patch)
tree2721b750c2aa6aeb68c67f4f0562fd4af0358987 /drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
parentV4L/DVB (10125): em28xx: Don't do AC97 vendor detection for i2s audio devices (diff)
downloadlinux-dev-1970f14fde9640cc2e238c031498900edbd8ff94.tar.xz
linux-dev-1970f14fde9640cc2e238c031498900edbd8ff94.zip
V4L/DVB (10127): stv06xx: Avoid having y unitialized
As pointed by gcc: drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c: In function ‘hdcs_set_size’: drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c:301: warning: ‘y’ may be used uninitialized in this function Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
index 1cfe58504553..14335a9e4bb5 100644
--- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
+++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
@@ -317,8 +317,10 @@ static int hdcs_set_size(struct sd *sd,
y = (hdcs->array.height - HDCS_1020_BOTTOM_Y_SKIP - height) / 2
+ hdcs->array.top;
- } else if (height > hdcs->array.height) {
- height = hdcs->array.height;
+ } else {
+ if (height > hdcs->array.height)
+ height = hdcs->array.height;
+
y = hdcs->array.top + (hdcs->array.height - height) / 2;
}