dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Haneen Mohammed <hamohammed.sa@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: rodrigosiqueiramelo@gmail.com
Subject: [PATCH] drm/vkms: Fix vmap_count increment position
Date: Wed, 1 Aug 2018 12:08:07 +0300	[thread overview]
Message-ID: <20180801090807.GA4611@haneenDRM> (raw)

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@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-08-01  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01  9:08 Haneen Mohammed [this message]
2018-08-08  3:59 ` [PATCH] drm/vkms: Fix vmap_count increment position Haneen Mohammed
2018-08-08  8:20   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180801090807.GA4611@haneenDRM \
    --to=hamohammed.sa@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=rodrigosiqueiramelo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox