Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753181AbbLEITA (ORCPT ); Sat, 5 Dec 2015 03:19:00 -0500 Received: from mga03.intel.com ([134.134.136.65]:9520 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbbLEIS7 (ORCPT ); Sat, 5 Dec 2015 03:18:59 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,384,1444719600"; d="scan'208";a="612943103" Date: Sat, 5 Dec 2015 13:51:42 +0530 From: Vinod Koul To: "M'boumba Cedric Madianga" Cc: mcoquelin.stm32@gmail.com, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH] dmaengine: stm32-dma: Fix static checker warning Message-ID: <20151205082142.GQ1854@localhost> References: <1448355155-31283-1-git-send-email-cedric.madianga@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448355155-31283-1-git-send-email-cedric.madianga@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1287 Lines: 41 On Tue, Nov 24, 2015 at 09:52:35AM +0100, M'boumba Cedric Madianga wrote: Title should say what is fixes rather than what flagged it off > This patch fix an unchecked dereference warning by returning operation > not permitted when stm32_dma_start_transfer() does not succeed to allocate > a virtual channel descriptor. > Also we give credit to reported by using tag Reported-by: xxx, pls add that as well > Signed-off-by: M'boumba Cedric Madianga > --- > drivers/dma/stm32-dma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c > index 12f3a3e..0214bcf 100644 > --- a/drivers/dma/stm32-dma.c > +++ b/drivers/dma/stm32-dma.c > @@ -437,7 +437,7 @@ static int stm32_dma_start_transfer(struct stm32_dma_chan *chan) > if (!chan->desc) { > vdesc = vchan_next_desc(&chan->vchan); > if (!vdesc) > - return 0; > + return -EPERM; > > chan->desc = to_stm32_dma_desc(vdesc); > chan->next_sg = 0; > -- > 1.9.1 > -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/