From patchwork Wed Apr 13 06:39:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: z X-Patchwork-Id: 12811639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30E0AC433F5 for ; Wed, 13 Apr 2022 07:40:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06BF110E3C5; Wed, 13 Apr 2022 07:40:01 +0000 (UTC) Received: from m15111.mail.126.com (m15111.mail.126.com [220.181.15.111]) by gabe.freedesktop.org (Postfix) with ESMTP id BEC16112224 for ; Wed, 13 Apr 2022 07:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=IPpag 3+972R44s++fbd4ZAcZ5wlqRJ02VxB1aGKpffw=; b=nEdXCtMrzOZ/zONktw5jg 1I09nJfdWLc33D9fu4tR5TH6vmjjL10DqtJS9HSLlbGPhEu2/zLYK8ZaIdcQwIAp 3lT1Sui3EmoDWNwM4loA5wVd3I+nL3blvsJBCcEIqrNLcdFRcsfXuXZIH8R3GBI1 4362rJv8MdczpkWAwIpCWI= Received: from ubuntu.localdomain (unknown [58.213.83.157]) by smtp1 (Coremail) with SMTP id C8mowACXpycocFZimRLWAQ--.47686S4; Wed, 13 Apr 2022 14:39:38 +0800 (CST) From: Bernard Zhao To: Thierry Reding , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpu/host1x: remove useless if(ptr) check to kfree Date: Tue, 12 Apr 2022 23:39:34 -0700 Message-Id: <20220413063934.23571-1-zhaojunkui2008@126.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CM-TRANSID: C8mowACXpycocFZimRLWAQ--.47686S4 X-Coremail-Antispam: 1Uf129KBjvdXoW5KrWxZr1UAw1xWFyfXr48Crg_yoWxXwb_ur 1kJr1kW3yrGFnYqa17ArnxZrW0yFZ8uaykZryIga4rtryUCrn8Jw17ur1fu3WrWa1rGFyD A3WxtrW5Jw17KjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRpwZzPUUUUU== X-Originating-IP: [58.213.83.157] X-CM-SenderInfo: p2kd0y5xqn3xasqqmqqrswhudrp/1tbiYArhqlpEG2eDWwAAsb X-Mailman-Approved-At: Wed, 13 Apr 2022 07:39:54 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bernard@vivo.com, Bernard Zhao Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch remove useless if(ptr) check to kfree. Signed-off-by: Bernard Zhao --- drivers/gpu/host1x/fence.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/host1x/fence.c b/drivers/gpu/host1x/fence.c index ecab72882192..05b36bfc8b74 100644 --- a/drivers/gpu/host1x/fence.c +++ b/drivers/gpu/host1x/fence.c @@ -93,8 +93,7 @@ static void host1x_syncpt_fence_release(struct dma_fence *f) { struct host1x_syncpt_fence *sf = to_host1x_fence(f); - if (sf->waiter) - kfree(sf->waiter); + kfree(sf->waiter); dma_fence_free(f); }