From 27fe2f800cd1d2147d33c0fcb06b96f004829c29 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 20 Jun 2013 16:28:16 -0300 Subject: [PATCH] upstream: [media] omap_vout: fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit media-git/drivers/media/platform/omap/omap_vout.c: In function ‘omapvid_init’: media-git/drivers/media/platform/omap/omap_vout.c:382:17: warning: ‘mode’ may be used uninitialized in this function [-Wmaybe-uninitialized] vout->dss_mode = video_mode_to_dss_mode(vout); ^ media-git/drivers/media/platform/omap/omap_vout.c:332:23: note: ‘mode’ was declared here enum omap_color_mode mode; ^ Signed-off-by: Hans Verkuil Cc: Laurent Pinchart Cc: Prabhakar Lad Acked-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/omap/omap_vout.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index d338b19..dfd0a21 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c @@ -335,8 +335,6 @@ static int video_mode_to_dss_mode(struct omap_vout_device *vout) ovl = ovid->overlays[0]; switch (pix->pixelformat) { - case 0: - break; case V4L2_PIX_FMT_YUYV: mode = OMAP_DSS_COLOR_YUV2; break; @@ -358,6 +356,7 @@ static int video_mode_to_dss_mode(struct omap_vout_device *vout) break; default: mode = -EINVAL; + break; } return mode; } -- 2.7.4