gma500: mmu: unmap the correct address
authorPan Bian <bianpan2016@163.com>
Sun, 29 Oct 2017 05:55:12 +0000 (13:55 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 30 Oct 2017 10:21:55 +0000 (11:21 +0100)
The function kunmap_atomatic() is called on the same variable twice,
i.e. pt->v. In the second call, its parameter should be variable v
rather than pt->v.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1509256512-5962-1-git-send-email-bianpan2016@163.com
drivers/gpu/drm/gma500/mmu.c

index 0eaf11c199395573b3fd5c75df6431907cb964fa..ccb161c73a59bb5a3287b300e17d1af774afc9f5 100644 (file)
@@ -395,7 +395,7 @@ static void psb_mmu_pt_unmap_unlock(struct psb_mmu_pt *pt)
                        psb_mmu_clflush(pd->driver, (void *)&v[pt->index]);
                        atomic_set(&pd->driver->needs_tlbflush, 1);
                }
-               kunmap_atomic(pt->v);
+               kunmap_atomic(v);
                spin_unlock(&pd->driver->lock);
                psb_mmu_free_pt(pt);
                return;