summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeeti Desai <neetid@codeaurora.org>2015-08-14 14:13:36 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:04:38 -0700
commitb3589b554da17f57b1b7cddd70014692a129eea5 (patch)
treebbadf1509b6a42723fc4fb48185c8f879c6e28e6
parent3eac23bf1a79166be1959d17f4cbb8762210ff34 (diff)
msm: ion: Do not call unassign on buffer if assign fails
During buffer allocation if the assign call fails, we call ion_system_secure_heap_free, which in turn does an unassign operation before freeing the buffer. We don't want to call unassign if the assign failed. Fix this by calling the underlying free function directly during error handling. Change-Id: I2deec6fd147c4200e16f3779e37330dca1d7d173 Signed-off-by: Neeti Desai <neetid@codeaurora.org>
-rw-r--r--drivers/staging/android/ion/ion_system_secure_heap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/ion_system_secure_heap.c b/drivers/staging/android/ion/ion_system_secure_heap.c
index 86a36568e43f..cb9baa4fc6ad 100644
--- a/drivers/staging/android/ion/ion_system_secure_heap.c
+++ b/drivers/staging/android/ion/ion_system_secure_heap.c
@@ -125,7 +125,7 @@ static int ion_system_secure_heap_allocate(struct ion_heap *heap,
return ret;
err:
- ion_system_secure_heap_free(buffer);
+ secure_heap->sys_heap->ops->free(buffer);
return ret;
}