mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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:
parent
978c4172af
commit
4168d0d9d3
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue