Commit 31e63d31 authored by Haneen Mohammed's avatar Haneen Mohammed Committed by Daniel Vetter

drm/vkms: Fix vmap_count increment position

Move vmap_count out of the conditional statement since it needs
to be updated for every successful call to vkms_gem_vmap.
Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
Fixes: bb112b14 ("drm/vkms: Add functions to map/unmap GEM backing storage")
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180801090807.GA4611@haneenDRM
parent e61e0f07
......@@ -239,10 +239,9 @@ int vkms_gem_vmap(struct drm_gem_object *obj)
vkms_obj->vaddr = vmap(pages, n_pages, VM_MAP, PAGE_KERNEL);
if (!vkms_obj->vaddr)
goto err_vmap;
vkms_obj->vmap_count++;
}
vkms_obj->vmap_count++;
goto out;
err_vmap:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment