From: Erik Gilling Date: Wed, 13 Apr 2011 00:36:04 +0000 (-0700) Subject: video: tegra: zero out var before calling fb_videomode_to_var X-Git-Tag: firefly_0821_release~9833^2~16^2 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=77a9f2d7ce63dd428ab66a1992333596d9c582e5;p=firefly-linux-kernel-4.4.55.git video: tegra: zero out var before calling fb_videomode_to_var Change-Id: I23f01da0a7dcd62594faa828676ffb7a4bc72d9f Signed-off-by: Erik Gilling --- diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index 1f0b967acd89..9b70114c9cd1 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -573,6 +573,7 @@ static int tegra_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long if (i >= modedb.modedb_len) break; + memset(&var, 0x0, sizeof(var)); fb_videomode_to_var(&var, &modelist->mode); if (copy_to_user((void __user *)&modedb.modedb[i], @@ -657,6 +658,8 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info, fb_info->info->mode = (struct fb_videomode *) fb_find_best_display(specs, &fb_info->info->modelist); + memset(&fb_info->info->var, 0x0, + sizeof(fb_info->info->var)); fb_videomode_to_var(&fb_info->info->var, fb_info->info->mode); tegra_fb_set_par(fb_info->info); }