projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71ada0f
)
MLK-12217 video: mxsfb: fix an uninitialized variable usage
author
Fancy Fang
<chen.fang@nxp.com>
Tue, 12 Jan 2016 10:03:39 +0000
(18:03 +0800)
committer
Nitin Garg
<nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:46 +0000
(14:49 -0500)
The 'vmode' variable is used before it is initialized.
So initialize it before that.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
drivers/video/fbdev/mxsfb.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/mxsfb.c
b/drivers/video/fbdev/mxsfb.c
index
d8c6885
..
7dea1ee
100644
(file)
--- a/
drivers/video/fbdev/mxsfb.c
+++ b/
drivers/video/fbdev/mxsfb.c
@@
-1024,6
+1024,8
@@
static int mxsfb_restore_mode(struct mxsfb_info *host)
if (!(ctrl & CTRL_RUN))
return -EINVAL;
+ memset(&vmode, 0, sizeof(vmode));
+
vdctrl0 = readl(host->base + LCDC_VDCTRL0);
vdctrl2 = readl(host->base + LCDC_VDCTRL2);
vdctrl3 = readl(host->base + LCDC_VDCTRL3);