From patchwork Wed Nov 19 16:37:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 5342521 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A576BC11AC for ; Wed, 19 Nov 2014 21:37:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC57020220 for ; Wed, 19 Nov 2014 21:37:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2E0AC20125 for ; Wed, 19 Nov 2014 21:37:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72F7B6F4D2; Wed, 19 Nov 2014 13:37:08 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.17.12]) by gabe.freedesktop.org (Postfix) with ESMTP id 05B206EECC for ; Wed, 19 Nov 2014 08:37:53 -0800 (PST) Received: from [192.168.1.2] ([78.49.204.140]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LkhBY-1YP5ZL1wF2-00aTDa; Wed, 19 Nov 2014 17:37:51 +0100 Message-ID: <546CC755.4010804@users.sourceforge.net> Date: Wed, 19 Nov 2014 17:37:41 +0100 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: David Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH 1/1] DRM-UDL: Deletion of an unnecessary check before the function call "vunmap" References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> In-Reply-To: <5317A59D.4@users.sourceforge.net> X-Provags-ID: V03:K0:5KRDcRPjPdIijuMQzaemq1s9JfjGwJ/02wN68YO20FTp8H2b2Z2 2VBYQ0l2up64qNjmTwLEg34S3yQF8lEFmh2aq5GaTjWVFAhYVTkEWKy5xEsoDApdqEv07vK c8MXJMMC7LrKvCijLnG1Vy5Mc1leMXAAwreaCUZdvPgAvG4tQFddqQzQMrbGZk1314mOWAW vG50vco3gLV7zjQ6ON6qA== X-UI-Out-Filterresults: notjunk:1; X-Mailman-Approved-At: Wed, 19 Nov 2014 13:37:06 -0800 Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 19 Nov 2014 17:33:32 +0100 The vunmap() function performes also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Thierry Reding --- drivers/gpu/drm/udl/udl_gem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c index 8044f5f..2979625 100644 --- a/drivers/gpu/drm/udl/udl_gem.c +++ b/drivers/gpu/drm/udl/udl_gem.c @@ -164,8 +164,7 @@ void udl_gem_vunmap(struct udl_gem_object *obj) return; } - if (obj->vmapping) - vunmap(obj->vmapping); + vunmap(obj->vmapping); udl_gem_put_pages(obj); }