From: Andy Shevchenko Date: Thu, 14 Feb 2013 09:00:17 +0000 (+0200) Subject: dma: coh901318: avoid unbalanced locking X-Git-Tag: v3.9-rc1~80^2~8 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=4168d0d9d304f184f786b1f00750557b8e09453c;p=~emulex%2Finfiniband.git dma: coh901318: avoid unbalanced locking In case the len is 0 we must return without trying to unlock the lock that was not locked. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/coh901318_lli.c b/drivers/dma/coh901318_lli.c index 780e0429b38..fe9cc5eedda 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);