From patchwork Wed Jan 2 10:41:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13762 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 28F4023EDC for ; Wed, 2 Jan 2013 10:49:48 +0000 (UTC) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by fiordland.canonical.com (Postfix) with ESMTP id B96DFA184A5 for ; Wed, 2 Jan 2013 10:49:47 +0000 (UTC) Received: by mail-vb0-f49.google.com with SMTP id r6so14056155vbi.36 for ; Wed, 02 Jan 2013 02:49:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=ni7RJU1j1ZU6txvHklhLWltjV4C/TwM0lmfqpjWqxcQ=; b=nzaGPRlTX/DpnQtP1OJKF+tk64/K+NP8VjFab9n9PSBCyOAjDFoIE7LV451+xpPJQA RxNqQYmNonlt8vPR0YPUEqHbkc+Drd2u5ed6lk7LiSO6VMT1xFFlcos0n4DZ5hwKiAtH QQCWWWYrfNF6bSy/SVUcCIiozrLZrotrfVuBslLafr/uEtfdXF85kA79SU6zTmE5Sb8h oKLAXNIGgZ3aAE4Qq3MjVgrV8h5aHbZbrnK92jORUi6zAIdhYp9PvPW0cZ75m8L6kwx/ pJAwAmnEge+onQG6gY8ecwoxpdmUlW9uVRFJsvjQQktnwu87ao4pf7bp55nZJabefCir /ExA== X-Received: by 10.220.157.9 with SMTP id z9mr70571493vcw.45.1357123787133; Wed, 02 Jan 2013 02:49:47 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp40161veb; Wed, 2 Jan 2013 02:49:46 -0800 (PST) X-Received: by 10.68.233.7 with SMTP id ts7mr139753352pbc.136.1357123785902; Wed, 02 Jan 2013 02:49:45 -0800 (PST) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by mx.google.com with ESMTPS id ak3si44070326pbd.35.2013.01.02.02.49.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 02:49:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.49; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f49.google.com with SMTP id bi1so7885974pad.22 for ; Wed, 02 Jan 2013 02:49:45 -0800 (PST) X-Received: by 10.68.229.194 with SMTP id ss2mr143740247pbc.17.1357123785301; Wed, 02 Jan 2013 02:49:45 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id jv1sm22962728pbc.36.2013.01.02.02.49.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 02:49:44 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: k.debski@samsung.com, s.nawrocki@samsung.com, sylvester.nawrocki@gmail.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] [media] s5p-mfc: Fix an error check Date: Wed, 2 Jan 2013 16:11:48 +0530 Message-Id: <1357123308-7355-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlSG4GblF+UfgolUvBv+1g3d7Ih9WZ3BaaCHO+lIXJhrFK+YKwSTIYoQFbZMsYl7ut8T06E Checking unsigned variable for negative value always returns false. Hence make this value signed as we expect it to be negative too. Signed-off-by: Sachin Kamat --- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c index 5f9a5e0..91d5087 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c @@ -535,8 +535,8 @@ void s5p_mfc_get_enc_frame_buffer_v6(struct s5p_mfc_ctx *ctx, int s5p_mfc_set_enc_ref_buffer_v6(struct s5p_mfc_ctx *ctx) { struct s5p_mfc_dev *dev = ctx->dev; - size_t buf_addr1, buf_size1; - int i; + size_t buf_addr1; + int i, buf_size1; mfc_debug_enter();