From: Philipp Zabel Date: Tue, 5 Aug 2014 17:00:18 +0000 (-0300) Subject: [media] coda: fix coda_s_fmt_vid_out X-Git-Tag: v3.18-rc1~101^2^2~464 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2dc546d00c8deb22aac50c8cc0c6293aab975c6b;p=thirdparty%2Fkernel%2Flinux.git [media] coda: fix coda_s_fmt_vid_out Set the context color space when s_fmt succeeded, not when it failed. Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index e84b32088fc08..dfecb8602f073 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -504,7 +504,9 @@ static int coda_s_fmt_vid_out(struct file *file, void *priv, ret = coda_s_fmt(ctx, f); if (ret) - ctx->colorspace = f->fmt.pix.colorspace; + return ret; + + ctx->colorspace = f->fmt.pix.colorspace; return ret; }