Skip to contentSkip to conversation

drm/mcde: Fix an uninitialized variable

PATCH In review Dan Carpenter 2 participants 2 messages May 29, 2019 – Jun 13, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/mcde: Fix an uninitialized variable

We never set "vblank" to "false".

Current versions of GCC will initialize it to zero automatically at certain optimization levels so that's probably why this didn't show up in testing.

Fixes 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
---
 drivers/gpu/drm/mcde/mcde_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/mcde/mcde_display.c +1 -1
index f3ef108a41d9..751454ae3cd1 100644
@@ -65,7 +65,7 @@ enum mcde_dsi_formatter {
 void mcde_display_irq(struct mcde *mcde)
 {
 	u32 mispp, misovl, mischnl;
-	bool vblank;
+	bool vblank = false;
 
 	/* Handle display IRQs */
 	mispp = readl(mcde->regs + MCDE_MISPP);
Signature · 1 line
2.20.1
#1 lore raw
Quoted 8 lines · Dan Carpenter

We never set "vblank" to "false".

Current versions of GCC will initialize it to zero automatically at certain optimization levels so that's probably why this didn't show up in testing.

Fixes 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")

Patch applied.

Yours,
Linus Walleij