Skip to contentSkip to conversation

dmaengine: omap-dma: initialize can_pause to false

PATCH Applied Colin King 2 participants 2 messages Oct 19, 2016 dmaengine

lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 dmaengine: omap-dma: initialize can_pause to false

From: Colin Ian King <[email protected]>

can_pause is not initialized so it contains garbage. Fix this by setting it to false.

Found using static analysis with cppcheck.

---
 drivers/dma/omap-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/omap-dma.c +1 -1
index fd6b9e6..15eb802 100644
@@ -1286,7 +1286,7 @@ static int omap_dma_pause(struct dma_chan *chan)
 	struct omap_dmadev *od = to_omap_dma_dev(chan->device);
 	unsigned long flags;
 	int ret = -EINVAL;
-	bool can_pause;
+	bool can_pause = false;
 
 	spin_lock_irqsave(&od->irq_lock, flags);
 
Signature · 1 line
2.9.3
Applied
#1 lore raw
Quoted 6 lines · Colin King

From: Colin Ian King <[email protected]>

can_pause is not initialized so it contains garbage. Fix this by setting it to false.

Found using static analysis with cppcheck.

It is usuallu helpful to show the warning generated by static tools.

Applied, anyway

Signature · 1 line
~Vinod