From patchwork Thu Jul 21 17:42:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9242127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7729560574 for ; Thu, 21 Jul 2016 17:43:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AD6D1FFD6 for ; Thu, 21 Jul 2016 17:43:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EF5C27D85; Thu, 21 Jul 2016 17:43:07 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F27951FFD6 for ; Thu, 21 Jul 2016 17:43:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E46756EA01; Thu, 21 Jul 2016 17:43:01 +0000 (UTC) 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.15.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 420506EA01 for ; Thu, 21 Jul 2016 17:42:58 +0000 (UTC) Received: from [192.168.1.2] ([78.49.136.201]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0McWXI-1bhxOz1lR2-00HeUp; Thu, 21 Jul 2016 19:42:41 +0200 Subject: [PATCH] GPU-DRM-Exynos: Delete an unnecessary check before the function call "vunmap" To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Daniel Vetter , David Airlie , Inki Dae , Joonyoung Shim , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Seung-Woo Kim 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> <54D28870.3060400@users.sourceforge.net> <54D329D0.7050006@samsung.com> From: SF Markus Elfring Message-ID: Date: Thu, 21 Jul 2016 19:42:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <54D329D0.7050006@samsung.com> X-Provags-ID: V03:K0:hMyd1kQTS17Nzd7OuGgMz9nKiQJHqoGkPSENkJe6hYv1Z/hAoXN DsjN+MgaPvdc5mT0++Fxe5GaFC5b4SDiYkwCf+BD3orfKXpalbox9JdjX2s/K8nToX6iVpA qnyjNprZPu2A76hI2gCMYPp9sHlPUmVG8y0Lm9SJjmq27XU84Lzdy8EXVFVZBS+JDWp0aeN m546xLovrqJ7DxWqnXUKQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:QaQvXWOS2RY=:VnoW+wOUczSNJogEwXTzQw qaUw1BBDWHi9b9ev4bFKKBFjsHitYgm5yILc+AoTLhQshyAHueQURlrNWUrdV0vqxtecOZ5+B +cxRhghbEaT01qoPBdgNjJtS84Lft3V3q5LviwPSbWQBGMqwsxrdZxTPgjJouqYct7gMdw/hX jWrclT92+SEV7qqJP/qZx3O6PmMvFH4+gOICSHT3n+Q0vGdE556DI7bSuzV6noZUDR6bOjzwX ex2iFio+uyhEnIFcEMcAZ991j95maxx0BQqwSilGedej5AUWIWZo7OTWX9X+bLRVRAq1Fd/9Q riDaEaPt9EEogDj+VpBE2M9MZeeP9835S2OORXyJSsuEqsyGBomHmydwNAJOKyrTJG5+Uhi3B gnW0GvX0wJ266WXdwAEesmtNZFf7xT8OrRI68EpGyKtg63wFM8wz7oXs4EiFaOXMlYGrQ3qP3 GM9n8nmDS1kp9NOenjvwsKJIbvC3vRB11ya/Hpp1a4h5iTb/TDvB1Onbsw/VbCHgREmuIF3de r0cOmz4Bw1PkR7PuSVDDHM5R+EYAAy6k81SJhOVAzPLlsiK2D+L4XWbXrgjEM7961jngvmfzC jz/jyrS2/Ux+mj6U+T3ooVfPTfuzQKwF6RCwC2QRqGf5+pQCpUIFsrqBDFXtyblBBMGzd4OU6 MIYMEnC2QoPkirjd5n4KN0lHwb6lGgtYdj7ExSrYQT1fhm9PbmjLFVmj9QZ6cQcnzNmOutMSY +DiF1UJlKxYP9p3OeldMG70W6ThlgRDyac+W7ni6wFjUxpVzez6MC/Wi8ADpIyc+i7Q8K5cxK 6soXr5l 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-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 21 Jul 2016 19:23:25 +0200 The vunmap() function performs 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 --- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index dd09117..4cfb39d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -269,8 +269,7 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev, struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem; struct drm_framebuffer *fb; - if (exynos_gem->kvaddr) - vunmap(exynos_gem->kvaddr); + vunmap(exynos_gem->kvaddr); /* release drm framebuffer and real buffer */ if (fb_helper->fb && fb_helper->fb->funcs) {