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 <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: [email protected]
Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
Andy Shevchenko 2013-02-14 11:00:17 +02:00 • committed by Vinod Koul
commit 4168d0d9d3

View file

@ -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);