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: 9242133 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 F1CE360574 for ; Thu, 21 Jul 2016 17:45:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E47762624D for ; Thu, 21 Jul 2016 17:45:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D660E27D85; Thu, 21 Jul 2016 17:45:13 +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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B1B62624D for ; Thu, 21 Jul 2016 17:45:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bQI0R-0000RY-EL; Thu, 21 Jul 2016 17:43:31 +0000 Received: from mout.web.de ([212.227.15.14]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bQI0O-0000Oe-Cl for linux-arm-kernel@lists.infradead.org; Thu, 21 Jul 2016 17:43:29 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160721_104328_768173_F337822C X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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) {