Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752818AbbLJEMq (ORCPT ); Wed, 9 Dec 2015 23:12:46 -0500 Received: from mga14.intel.com ([192.55.52.115]:63671 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbbLJEMp (ORCPT ); Wed, 9 Dec 2015 23:12:45 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,406,1444719600"; d="scan'208";a="857788590" Date: Thu, 10 Dec 2015 09:45:44 +0530 From: Vinod Koul To: "M'boumba Cedric Madianga" Cc: dan.j.williams@intel.com, mcoquelin.stm32@gmail.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] dmaengine: stm32-dma: Fix unchecked deference of chan->desc Message-ID: <20151210041544.GO1854@localhost> References: <1449486028-29344-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: <1449486028-29344-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: 791 Lines: 20 On Mon, Dec 07, 2015 at 12:00:28PM +0100, M'boumba Cedric Madianga wrote: > 'commit d8b468394fb7 ("dmaengine: Add STM32 DMA driver")' leads to the > following Smatch complaint: > > drivers/dma/stm32-dma.c:562 stm32_dma_issue_pending() > error: we previously assumed 'chan->desc' could be null (see line 560) > > So, this patch fixes the unchecked dereference of chan->desc by returning > operation not permitted error when stm32_dma_start_transfer() does not > succeed to allocate a virtual channel descriptor. Applied, thanks -- ~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/