From patchwork Thu Mar 5 13:56:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 5946201 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 85F839F373 for ; Thu, 5 Mar 2015 13:56:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C40E420381 for ; Thu, 5 Mar 2015 13:56:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C95732038D for ; Thu, 5 Mar 2015 13:56:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755528AbbCEN4f (ORCPT ); Thu, 5 Mar 2015 08:56:35 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:65173 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947AbbCEN4e (ORCPT ); Thu, 5 Mar 2015 08:56:34 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NKQ001B3S28G3B0@mailout4.samsung.com> for linux-media@vger.kernel.org; Thu, 05 Mar 2015 22:56:32 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-2d-54f86090d974 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F4.D1.20081.09068F45; Thu, 05 Mar 2015 22:56:32 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NKQ0041KS23QH30@mmp2.samsung.com>; Thu, 05 Mar 2015 22:56:32 +0900 (KST) From: Jacek Anaszewski To: linux-media@vger.kernel.org Cc: Jacek Anaszewski , Sylwester Nawrocki Subject: [PATCH] s5p-jpeg: Initialize jpeg_addr fields to zero Date: Thu, 05 Mar 2015 14:56:25 +0100 Message-id: <1425563785-20650-1-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOJMWRmVeSWpSXmKPExsVy+t9jQd0JCT9CDJremVj0Xn3OaNGzYSur xeE37awOzB59W1YxenzeJBfAFMVlk5Kak1mWWqRvl8CVcfrGP6aCFp6Kvr9/WBoYJ3J1MXJy SAiYSKyY+o4NwhaTuHBvPZgtJDCdUeLNd6UuRi4gu51JYtPiCawgCTYBQ4mfL14zgdgiAvIS T3pvgDUwC8RJPDh7ghnEFhawk9i9dx5YDYuAqsTsFZcYQWxeAQ+Jj8suAM3hAFqmIDFnks0E Ru4FjAyrGEVTC5ILipPScw31ihNzi0vz0vWS83M3MYK9+0xqB+PKBotDjAIcjEo8vDM2fg8R Yk0sK67MPcQowcGsJMJ7JfJHiBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFeJfu2ECGB9MSS1OzU 1ILUIpgsEwenVAOj24yDJ5fPz9V6WiTIcjaYtUvBTbzaYfrEz9d1pRbx9Fx5/S3y59l1u17u qKn5Krg7uGr/h4j5KnxVicaRCwznhWk+SDSyf6e3VeLp9H7b3iT9RVdDdvZ8Vz5zwmiZZNPU T03Ppwrs8mmSnVr4ZPMeO83IosaoBIODJ2wjrKaLxD52cvp1ODNIiaU4I9FQi7moOBEAiDcd WuoBAAA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP JPEG codecs on Exynos4 and Exynos3250 SoCs utilize different number of planes for storing the raw image data, depending on the format of the image being processed. For the unused planes a random data was being written to the related registers. Regardless of the fact that this seemed not to be harmful, fix the issue for clarity reasons. Signed-off-by: Jacek Anaszewski Reported-by: Andrzej Pietrasiewicz Cc: Sylwester Nawrocki --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 12f7452..fb97c4c 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1842,7 +1842,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx) struct s5p_jpeg *jpeg = ctx->jpeg; struct s5p_jpeg_fmt *fmt; struct vb2_buffer *vb; - struct s5p_jpeg_addr jpeg_addr; + struct s5p_jpeg_addr jpeg_addr = {}; u32 pix_size, padding_bytes = 0; pix_size = ctx->cap_q.w * ctx->cap_q.h; @@ -1943,7 +1943,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx) struct s5p_jpeg *jpeg = ctx->jpeg; struct s5p_jpeg_fmt *fmt; struct vb2_buffer *vb; - struct s5p_jpeg_addr jpeg_addr; + struct s5p_jpeg_addr jpeg_addr = {}; u32 pix_size; pix_size = ctx->cap_q.w * ctx->cap_q.h;