[media] coda: fix coda_s_fmt_vid_out
authorPhilipp Zabel <philipp.zabel@gmail.com>
Tue, 5 Aug 2014 17:00:18 +0000 (14:00 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 21 Aug 2014 20:25:26 +0000 (15:25 -0500)
Set the context color space when s_fmt succeeded, not when it failed.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/coda/coda-common.c

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