soc: qcom: spcom: lock ion buf, decrement ref count if no free entry
spcom_handle_lock_ion_buf_command() should decrement ref count, that is incremented by ion_import_dma_buf(). Change-Id: Ic7f814bd2791b4dbcf6356f64ad32ee85c6cb103 Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
This commit is contained in:
parent
ba53c4518c
commit
618dde7de1
1 changed files with 3 additions and 1 deletions
|
@ -1744,7 +1744,9 @@ static int spcom_handle_lock_ion_buf_command(struct spcom_channel *ch,
|
|||
}
|
||||
}
|
||||
|
||||
pr_err("fd [%d] ion buf not found.\n", fd);
|
||||
pr_err("no free entry to store ion handle of fd [%d].\n", fd);
|
||||
/* decrement back the ref count */
|
||||
ion_free(spcom_dev->ion_client, ion_handle);
|
||||
|
||||
return -EFAULT;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue