Message ID | 1406385272-425-1-git-send-email-philipp.zabel@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index dbd04ee..95d0b04 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -530,7 +530,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; }
Set the context color space when s_fmt succeeded, not when it failed. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> --- drivers/media/platform/coda/coda-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)