Commit fe653786 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] omap_vout: fix compiler warning

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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Prabhakar Lad <prabhakar.lad@ti.com>
Acked-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 20420f92
...@@ -335,8 +335,6 @@ static int video_mode_to_dss_mode(struct omap_vout_device *vout) ...@@ -335,8 +335,6 @@ static int video_mode_to_dss_mode(struct omap_vout_device *vout)
ovl = ovid->overlays[0]; ovl = ovid->overlays[0];
switch (pix->pixelformat) { switch (pix->pixelformat) {
case 0:
break;
case V4L2_PIX_FMT_YUYV: case V4L2_PIX_FMT_YUYV:
mode = OMAP_DSS_COLOR_YUV2; mode = OMAP_DSS_COLOR_YUV2;
break; break;
...@@ -358,6 +356,7 @@ static int video_mode_to_dss_mode(struct omap_vout_device *vout) ...@@ -358,6 +356,7 @@ static int video_mode_to_dss_mode(struct omap_vout_device *vout)
break; break;
default: default:
mode = -EINVAL; mode = -EINVAL;
break;
} }
return mode; return mode;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment