From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944532AbcJSPNj (ORCPT ); Wed, 19 Oct 2016 11:13:39 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:46476 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S944381AbcJSPNh (ORCPT ); Wed, 19 Oct 2016 11:13:37 -0400 From: Colin King To: Dan Williams , Vinod Koul , dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: omap-dma: initialize can_pause to false Date: Wed, 19 Oct 2016 12:05:53 +0100 Message-Id: <20161019110553.26168-1-colin.king@canonical.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King can_pause is not initialized so it contains garbage. Fix this by setting it to false. Found using static analysis with cppcheck. Signed-off-by: Colin Ian King --- drivers/dma/omap-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index fd6b9e6..15eb802 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -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); -- 2.9.3