From patchwork Thu Sep 10 10:17:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 516216 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id DBD90140281; Thu, 10 Sep 2015 20:17:54 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZZyvP-0002IO-ED; Thu, 10 Sep 2015 10:17:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZZyv4-00023k-KA for kernel-team@lists.ubuntu.com; Thu, 10 Sep 2015 10:17:30 +0000 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZZyv4-0000Ap-Hb for kernel-team@lists.ubuntu.com; Thu, 10 Sep 2015 10:17:30 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/5] bcm2708_fb: remove unnecessary initialization of result Date: Thu, 10 Sep 2015 12:17:26 +0200 Message-Id: <1441880248-29315-4-git-send-email-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441880248-29315-1-git-send-email-paolo.pisati@canonical.com> References: <1441880248-29315-1-git-send-email-paolo.pisati@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Colin Ian King static analysis by cppcheck detected an unnecessary initialization of variable 'result' which is re-assigned almost immediately after the initialization. Remove the redundant initialization. [drivers/video/fbdev/bcm2708_fb.c:406]: (performance) Variable 'result' is reassigned a value before the old one has been used. Signed-off-by: Colin Ian King Signed-off-by: Paolo Pisati --- drivers/video/fbdev/bcm2708_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c index fed0672..0f62d76 100644 --- a/drivers/video/fbdev/bcm2708_fb.c +++ b/drivers/video/fbdev/bcm2708_fb.c @@ -420,7 +420,7 @@ static int bcm2708_fb_blank(int blank_mode, struct fb_info *info) static int bcm2708_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { - s32 result = -1; + s32 result; info->var.xoffset = var->xoffset; info->var.yoffset = var->yoffset; result = bcm2708_fb_set_par(info);