diff options
| author | Amir Samuelov <amirs@codeaurora.org> | 2017-03-24 11:37:35 +0300 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-26 01:56:04 -0700 |
| commit | 618dde7de185ccb069e2e1f6b7a364efb9e05de3 (patch) | |
| tree | f668441e7404958c5af8ec3bded75ab05b8902b7 /drivers/soc | |
| parent | ba53c4518c7bf3b3abda54284cfb2a6d2175749b (diff) | |
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>
Diffstat (limited to 'drivers/soc')
| -rw-r--r-- | drivers/soc/qcom/spcom.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/qcom/spcom.c b/drivers/soc/qcom/spcom.c index 457361ba5ff8..0c44d76bc7c7 100644 --- a/drivers/soc/qcom/spcom.c +++ b/drivers/soc/qcom/spcom.c @@ -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; } |
