[media] s5p-jpeg: Initialize cb and cr to zero
authorTony K Nadackal <tony.kn@samsung.com>
Wed, 17 Dec 2014 07:21:21 +0000 (04:21 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 4 Mar 2015 11:57:12 +0000 (08:57 -0300)
To avoid garbage value written into image base address planes,
initialize cb and cr of structure s5p_jpeg_addr to zero.

Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/s5p-jpeg/jpeg-core.c

index 12f7452edce3708a989eb0e7f71a94def8a31665..a92ff4249d100d33e84acaf50b372eb5e2a190b0 100644 (file)
@@ -1845,6 +1845,9 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
        struct s5p_jpeg_addr jpeg_addr;
        u32 pix_size, padding_bytes = 0;
 
+       jpeg_addr.cb = 0;
+       jpeg_addr.cr = 0;
+
        pix_size = ctx->cap_q.w * ctx->cap_q.h;
 
        if (ctx->mode == S5P_JPEG_ENCODE) {