From patchwork Tue Feb 12 10:58:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 2127871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 0F2D13FCD5 for ; Tue, 12 Feb 2013 11:01:59 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5DZl-0002Ab-9M; Tue, 12 Feb 2013 10:59:01 +0000 Received: from mga03.intel.com ([143.182.124.21]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5DZi-0002A1-Uu for linux-arm-kernel@lists.infradead.org; Tue, 12 Feb 2013 10:58:59 +0000 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 12 Feb 2013 02:58:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,648,1355126400"; d="scan'208";a="201419208" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.173]) by AZSMGA002.ch.intel.com with ESMTP; 12 Feb 2013 02:58:55 -0800 Received: from andy by smile with local (Exim 4.80) (envelope-from ) id 1U5DZS-0004xi-HT; Tue, 12 Feb 2013 12:58:42 +0200 From: Andy Shevchenko To: Vinod Koul , linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH 3/6] dma: coh901318_lli: avoid unbalanced locking Date: Tue, 12 Feb 2013 12:58:36 +0200 Message-Id: <1360666720-19006-4-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360666720-19006-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1360666720-19006-1-git-send-email-andriy.shevchenko@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130212_055859_108589_48D9620B X-CRM114-Status: GOOD ( 10.95 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [143.182.124.21 listed in list.dnswl.org] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Linus Walleij , Andy Shevchenko , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org I have not checked the code but there is a possibility that custom pool->lock is not needed at all due to dma_pool contains it's own lock. Signed-off-by: Andy Shevchenko Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org --- drivers/dma/coh901318_lli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/coh901318_lli.c b/drivers/dma/coh901318_lli.c index 3e96610..702112d 100644 --- a/drivers/dma/coh901318_lli.c +++ b/drivers/dma/coh901318_lli.c @@ -61,7 +61,7 @@ coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len) dma_addr_t phy; if (len == 0) - goto err; + return NULL; spin_lock(&pool->lock);