Revert "crypto: Fix memory leak in bam_release call"

This reverts commit 8d175c9d77, which
release pbam memory when an error occurs. However, on a device with
multiple ce, pbam memory is shared by multiple pce_dev, it can only
be freed when the reference count goes to zero, and can not be
released it if reference count is not zero when an error occurs.
The previous implementation on bam_release was correct, so we
revert commit 8d175c9d77.

Change-Id: Ibc3b83dd46ea087c7a0084d032d96a2848f6baf5
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
This commit is contained in:
Zhen Kong 2013-12-19 10:00:29 -08:00
parent 9af769f13a
commit ea5ec1f1ab
1 changed files with 2 additions and 1 deletions

View File

@ -2618,8 +2618,9 @@ static void qce_sps_release_bam(struct qce_device *pce_dev)
pr_debug("delete bam 0x%x\n", pbam->bam_mem);
list_del(&pbam->qlist);
kfree(pbam);
pce_dev->pbam = NULL;
ret:
pce_dev->pbam = NULL;
mutex_unlock(&bam_register_lock);
}