[media] omap_vout: fix compiler warning
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 20 Jun 2013 19:28:16 +0000 (16:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 28 Jun 2013 18:06:49 +0000 (15:06 -0300)
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 <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Prabhakar Lad <prabhakar.lad@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/omap/omap_vout.c

index d338b19da544c92e8e1c73c66092ca96575bcb59..dfd0a21a06588b26ee7ccc290e59e9f853175ea2 100644 (file)
@@ -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;
 }