|
@@ -262,13 +262,14 @@ static void *ti_dra7_xbar_route_allocate(struct of_phandle_args *dma_spec,
|
|
|
mutex_lock(&xbar->mutex);
|
|
|
map->xbar_out = find_first_zero_bit(xbar->dma_inuse,
|
|
|
xbar->dma_requests);
|
|
|
- mutex_unlock(&xbar->mutex);
|
|
|
if (map->xbar_out == xbar->dma_requests) {
|
|
|
+ mutex_unlock(&xbar->mutex);
|
|
|
dev_err(&pdev->dev, "Run out of free DMA requests\n");
|
|
|
kfree(map);
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
}
|
|
|
set_bit(map->xbar_out, xbar->dma_inuse);
|
|
|
+ mutex_unlock(&xbar->mutex);
|
|
|
|
|
|
map->xbar_in = (u16)dma_spec->args[0];
|
|
|
|