Skip to contentSkip to conversation

s5p-jpeg: Initialize cb and cr to zero.

PATCH New Tony K Nadackal 1 participant 2 messages Dec 17, 2014 – Jan 5, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s5p-jpeg: Initialize cb and cr to zero.

To avoid garbage value written into image base address planes, initialize cb and cr of structure s5p_jpeg_addr to zero.

---
This patch is created and tested on top of linux-next-20141210. It can be cleanly applied on media-next and kgene/for-next.

 drivers/media/platform/s5p-jpeg/jpeg-core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/platform/s5p-jpeg/jpeg-core.c +3 -0
index 91bd3e6..54fa5d9 100644
@@ -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) {
Signature · 1 line
2.2.0
#1 lore raw

PATCH 1/1 s5p-jpeg: Initialize cb and cr to zero.

Gentle Reminder.

Thanks,
Tony

Quoted 11 lines

-----Original Message-----
From: Tony K Nadackal [mailto:[email protected]]
Sent: Wednesday, December 17, 2014 12:51 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Tony K Nadackal
Subject: [PATCH] [media] s5p-jpeg: Initialize cb and cr to zero.

To avoid garbage value written into image base address planes, initialize cb

and cr

Quoted 28 lines

of structure s5p_jpeg_addr to zero.

---
This patch is created and tested on top of linux-next-20141210. It can be cleanly applied on media-next and kgene/for-next.

 drivers/media/platform/s5p-jpeg/jpeg-core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/platform/s5p-jpeg/jpeg-core.c +3 -0
index 91bd3e6..54fa5d9 100644
@@ -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) {
--
2.2.0