summaryrefslogtreecommitdiff
path: root/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2017-04-28 13:09:33 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-28 14:27:25 +0200
commitb83cc378dfc46a06efecd14d2e5c687a2ac335d2 (patch)
treec8da753c163a26ff10a9dc42005393571d51cc85 /drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
parentec58cbed3f8879ae9d9447f49ff3cd57f315f5d8 (diff)
atomisp: clean up the hmm init/cleanup indirections
We don't need any of these indirections as we only support one MMU type. Start by getting rid of the init/clear/free ones. The init ordering check we already pushed down in a previous patch. The allocation side is more complicated so leave it for now. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
index 14537ab3d04b..358872393646 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
@@ -272,6 +272,8 @@ void hmm_free(ia_css_ptr virt)
{
struct hmm_buffer_object *bo;
+ WARN_ON(!virt);
+
bo = hmm_bo_device_search_start(&bo_device, (unsigned int)virt);
if (!bo) {
@@ -284,9 +286,7 @@ void hmm_free(ia_css_ptr virt)
hmm_mem_stat.tol_cnt -= bo->pgnr;
hmm_bo_unbind(bo);
-
hmm_bo_free_pages(bo);
-
hmm_bo_unref(bo);
}