From: Haneen Mohammed Date: Wed, 1 Aug 2018 09:08:07 +0000 (+0300) Subject: drm/vkms: Fix vmap_count increment position X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=31e63d31eaf066651efac299913591b04c5aaa18;p=openwrt%2Fstaging%2Fblogic.git 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: Haneen Mohammed Fixes: bb112b14af8d ("drm/vkms: Add functions to map/unmap GEM backing storage") Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180801090807.GA4611@haneenDRM --- diff --git a/drivers/gpu/drm/vkms/vkms_gem.c b/drivers/gpu/drm/vkms/vkms_gem.c index c55a5719b6c1..d04e988b4cbe 100644 --- a/drivers/gpu/drm/vkms/vkms_gem.c +++ b/drivers/gpu/drm/vkms/vkms_gem.c @@ -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: