kernel/drivers/dma/dmaengine.c
.. .. @@ -451,7 +451,8 @@ 451 451 /* The channel is already in use, update client count */ 452 452 if (chan->client_count) { 453 453 __module_get(owner); 454 - goto out;454 + chan->client_count++;455 + return 0;455 456 } 456 457 457 458 if (!try_module_get(owner)) .. .. @@ -470,11 +471,11 @@ 470 471 goto err_out; 471 472 } 472 473 474 + chan->client_count++;475 +473 476 if (!dma_has_cap(DMA_PRIVATE, chan->device->cap_mask)) 474 477 balance_ref_count(chan); 475 478 476 -out:477 - chan->client_count++;478 479 return 0; 479 480 480 481 err_out: