[PATCH 3/5] bcm2708_fb: remove unnecessary initialization of result
Paolo Pisati
paolo.pisati at canonical.com
Thu Sep 10 10:17:26 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
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 <colin.king at canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
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);
--
2.1.4
More information about the kernel-team
mailing list