[PATCH] drm/vkms: Fix vmap_count increment position
Haneen Mohammed
hamohammed.sa at gmail.com
Wed Aug 1 09:08:07 UTC 2018
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: Haneen Mohammed <hamohammed.sa at gmail.com>
---
drivers/gpu/drm/vkms/vkms_gem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vkms/vkms_gem.c b/drivers/gpu/drm/vkms/vkms_gem.c
index a52e88338c05..5c51dfde7c1e 100644
--- a/drivers/gpu/drm/vkms/vkms_gem.c
+++ b/drivers/gpu/drm/vkms/vkms_gem.c
@@ -240,10 +240,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:
--
2.17.1
More information about the dri-devel
mailing list