From patchwork Wed Aug 1 09:08:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haneen Mohammed X-Patchwork-Id: 10553291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82B0A15E2 for ; Thu, 2 Aug 2018 07:20:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D9E42A6E5 for ; Thu, 2 Aug 2018 07:20:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 600E52AF6F; Thu, 2 Aug 2018 07:20:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2E2E12A6E5 for ; Thu, 2 Aug 2018 07:20:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 976556E353; Thu, 2 Aug 2018 07:19:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-x241.google.com (mail-pl0-x241.google.com [IPv6:2607:f8b0:400e:c01::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7069B6E287 for ; Wed, 1 Aug 2018 09:08:11 +0000 (UTC) Received: by mail-pl0-x241.google.com with SMTP id w3-v6so8494715plq.2 for ; Wed, 01 Aug 2018 02:08:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=/KQOcqiGwvDho8cE+Y2BpIsWFzixCn0Mmvami3Z4fxE=; b=q7QePMtkTBWEGBMu6rZP6O3mx05O8GUPMlGl7bLSgvO+OVdqVNqgJMBhVPvagtsGhN AsR7vWlnDKX5dbTc6RlXb24x8YMlXYIZHX2xpwGjX7cnOUdlJ3XDhiKJRz6TRFpyZmEr 7fw64Q4R1zVs3fCtIX6wuDgKp6EPQUfjSXBQmgRi34eEPJQE4FfG6cp+ytyGZtF1zacz 5Hqd0mh/ISOqg86HIpEzvLKwSB/4k5GeHQX09bPUGBoKYXOOdxvd4SDBiaMJw6gnKmAh g6yJPyazFp72pWR01Bazncd5WpM/fGIzMcqpGx0cKNUAla/EyotVuw8oUhap9o7m6Inz m/xw== X-Gm-Message-State: AOUpUlGv6Sx57aK+8NmmcqZEZvh1tYxmpZM3o3/kewtU0xvdywilW2du EE3Uj6IRsChupNAh4aW76ASk/M6R X-Google-Smtp-Source: AAOMgpfINGBsVK0pbGVyxmkP+nyx8Ywej3+UJ254UpxTDn8l2Nle9r2QEwjgFI31okFVVU8OTBSV6A== X-Received: by 2002:a17:902:1a9:: with SMTP id b38-v6mr23622449plb.89.1533114490859; Wed, 01 Aug 2018 02:08:10 -0700 (PDT) Received: from haneenDRM ([64.77.242.50]) by smtp.gmail.com with ESMTPSA id s85-v6sm29959147pfa.116.2018.08.01.02.08.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Aug 2018 02:08:10 -0700 (PDT) Date: Wed, 1 Aug 2018 12:08:07 +0300 From: Haneen Mohammed To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/vkms: Fix vmap_count increment position Message-ID: <20180801090807.GA4611@haneenDRM> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Thu, 02 Aug 2018 07:19:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rodrigosiqueiramelo@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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: