mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge "dsp: ion: avoid dma_buf_put twice when msm_audio_ion_map_buf fails"
This commit is contained in:
commit
87e8178fd7
1 changed files with 1 additions and 5 deletions
|
|
@ -588,17 +588,13 @@ int msm_audio_ion_alloc(struct dma_buf **dma_buf, size_t bufsz,
|
|||
rc = msm_audio_ion_map_buf(*dma_buf, paddr, plen, vaddr);
|
||||
if (rc) {
|
||||
pr_err("%s: failed to map ION buf, rc = %d\n", __func__, rc);
|
||||
goto err_dma_buf;
|
||||
goto err;
|
||||
}
|
||||
pr_debug("%s: mapped address = %pK, size=%zd\n", __func__,
|
||||
*vaddr, bufsz);
|
||||
|
||||
memset(*vaddr, 0, bufsz);
|
||||
|
||||
return rc;
|
||||
|
||||
err_dma_buf:
|
||||
dma_buf_put(*dma_buf);
|
||||
err:
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue