From 2e616c122216c0c912b72841759da0bb03f2fc97 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 28 Nov 2011 08:25:30 -0300 Subject: [PATCH] --- yaml --- r: 285393 b: refs/heads/master c: c3cd257402fdcd650816ec25b83480a24912430a h: refs/heads/master i: 285391: 20fc256cdf079ceda5b75c8d66bce655e0e88174 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/omap3isp/ispvideo.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 4bd8a243b866..b5900ee4feaa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 22db44cb9cd67d56b02b2b5dceb10d3d1361b28b +refs/heads/master: c3cd257402fdcd650816ec25b83480a24912430a diff --git a/trunk/drivers/media/video/omap3isp/ispvideo.c b/trunk/drivers/media/video/omap3isp/ispvideo.c index d1000723c5ae..ffe7ce9eb4bc 100644 --- a/trunk/drivers/media/video/omap3isp/ispvideo.c +++ b/trunk/drivers/media/video/omap3isp/ispvideo.c @@ -210,14 +210,14 @@ static void isp_video_pix_to_mbus(const struct v4l2_pix_format *pix, mbus->width = pix->width; mbus->height = pix->height; - for (i = 0; i < ARRAY_SIZE(formats); ++i) { + /* Skip the last format in the loop so that it will be selected if no + * match is found. + */ + for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) { if (formats[i].pixelformat == pix->pixelformat) break; } - if (WARN_ON(i == ARRAY_SIZE(formats))) - return; - mbus->code = formats[i].code; mbus->colorspace = pix->colorspace; mbus->field = pix->field;