From patchwork Thu Oct 10 07:06:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seung-Woo Kim X-Patchwork-Id: 3014371 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D0B50BF924 for ; Thu, 10 Oct 2013 07:06:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B430A20125 for ; Thu, 10 Oct 2013 07:06:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DA11200E0 for ; Thu, 10 Oct 2013 07:06:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752019Ab3JJHGm (ORCPT ); Thu, 10 Oct 2013 03:06:42 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:16198 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125Ab3JJHGl (ORCPT ); Thu, 10 Oct 2013 03:06:41 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MUF00LOXYCJXL90@mailout4.samsung.com>; Thu, 10 Oct 2013 16:06:28 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.112]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 02.EF.31253.4F156525; Thu, 10 Oct 2013 16:06:28 +0900 (KST) X-AuditID: cbfee690-b7f3b6d000007a15-0b-525651f49b44 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 94.A7.09055.3F156525; Thu, 10 Oct 2013 16:06:28 +0900 (KST) Received: from localhost.localdomain ([10.252.75.83]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MUF00IXKYEP12G2@mmp2.samsung.com>; Thu, 10 Oct 2013 16:06:27 +0900 (KST) From: Seung-Woo Kim To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org, m.chehab@samsung.com, s.nawrocki@samsung.com Cc: sw0312.kim@samsung.com Subject: [PATCH] s5p-jpeg: fix uninitialized use in hdr parse Date: Thu, 10 Oct 2013 16:06:31 +0900 Message-id: <1381388791-1828-1-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsWyRsSkQPdLYFiQwdxrHBY9G7ayWsw4v4/J 4uI6eYvDb9qBvMkv2RxYPfq2rGL0+LxJLoApissmJTUnsyy1SN8ugStj2QGhghb2ihPzmpgb GE+zdjFyckgImEjcuLoIyhaTuHBvPVsXIxeHkMBSRomt/bsYuxg5wIo+zfaAiE9nlFjf2QXW ICTQyiSxdokqiM0moCOxf8lvsLiIQJHEtaf3wGxmASmJbUtBhnJyCAvYShw6PAPMZhFQlfh3 fjEziM0r4Cpx+9l6JogjFCQW3HsLdoSEwG02ib5711ghGgQkvk0+xAJxkKzEpgPMEPWSEgdX 3GCZwCi4gJFhFaNoakFyQXFSepGJXnFibnFpXrpecn7uJkZg+J3+92zCDsZ7B6wPMSYDjZvI LCWanA8M37ySeENjMyMLUxNTYyNzSzPShJXEedVbrAOFBNITS1KzU1MLUovii0pzUosPMTJx cEo1MDZN0PpyxeFUkteir/7KJ5KUFsZNEt+yyXa7oRyXkYQ2T/6S5Se+HT5xSmDhxfiLO7TZ ZdlfJqWJirGsi1nvwiCQLC3YE7Bsqb7jmvUiuvxxOeviV+1xSNDe/uHSkmfv/LR6D6U//bNr uv7HKvnXz2arXjt//nhkR49Zje+SpGLdaBfxdXZJs5VYijMSDbWYi4oTAXV8ML9VAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPIsWRmVeSWpSXmKPExsVy+t9jQd0vgWFBBpPWMlr0bNjKajHj/D4m i4vr5C0Ov2kH8ia/ZHNg9ejbsorR4/MmuQCmqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hT MwNDXUNLC3MlhbzE3FRbJRefAF23zBygbUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC 4HqMDNBAwhrGjGUHhApa2CtOzGtibmA8zdrFyMEhIWAi8Wm2RxcjJ5ApJnHh3nq2LkYuDiGB 6YwS6zu7WEESQgKtTBJrl6iC2GwCOhL7l/wGi4sIFElce3oPzGYWkJLYthSkmZNDWMBW4tDh GWA2i4CqxL/zi5lBbF4BV4nbz9YzQSxTkFhw7y3bBEbuBYwMqxhFUwuSC4qT0nMN9YoTc4tL 89L1kvNzNzGCg/uZ1A7GlQ0WhxgFOBiVeHgrykKDhFgTy4orcw8xSnAwK4nwTj8JFOJNSays Si3Kjy8qzUktPsSYDLR9IrOUaHI+MPLySuINjU3MjCyNzA0tjIzNSRNWEuc90GodKCSQnliS mp2aWpBaBLOFiYNTqoHRYn8S7+oLqy6yVEa+z3x0+8od/sxb4X1tum8fti5UDBcImT83osfv YbvSjWtnvTpq1nNffeE3f8K/zw2F63UDNI9OeJBnUlM69ed009ANc7aUX6jef+dz99GQ3B32 HgHHNzfHrRfdsmPN/rPZurMLZnB9OP3UueO3g2PjvP6pt1/J9y5S5+Kaq8RSnJFoqMVcVJwI AD4Dw6GyAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 For hdr parse error, it can return false without any assignments which cause build warning. Signed-off-by: Seung-Woo Kim --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++-- 1 files 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 15d2396..7db374e 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -442,14 +442,14 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result, while (notfound) { c = get_byte(&jpeg_buffer); if (c == -1) - break; + return false; if (c != 0xff) continue; do c = get_byte(&jpeg_buffer); while (c == 0xff); if (c == -1) - break; + return false; if (c == 0) continue; length = 0;