Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3516528pxj; Tue, 1 Jun 2021 07:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2p0njaz5p9iBx1JlDt0c9KQkW9ajwKhceiHKemlNRfYVhIDpf4psD52rvOde3AjyXNHMd X-Received: by 2002:a92:7510:: with SMTP id q16mr21465402ilc.291.1622556521658; Tue, 01 Jun 2021 07:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622556521; cv=none; d=google.com; s=arc-20160816; b=jdbArfgKLKT7FJG54pt8twDTu38dk4lDUSajGu1biDlJa/I3mz2s7p1cSCxVSxSHwZ yshnpa440ccrzwkkJScAKXJTt0mVtr95fFNsV4N0JYkzqStWIKW3wyg1MiyMAwgXPnYt mWrdMvtJ+BPEG69DXVuEjW58o0jVMR3CFVF29XJ6gi48+gNa/slhT5RJzpHp1fT0or1y 62I2NTBVKBgJaocgFaw5gkm9Aocn5SOKq0teL57okZY7FNo3uRYFdXNE6zStoY0ZJmcO avuSA9sf27vglmH6mzhBSfSYmSZYsXgUEb4NzaXYalmrfEMlicugn4zeDIPy1F9FWQMm NhVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ix7ouywPZMO5wByhh7PghgLaMOp5RtjACzhL/NTfWzg=; b=U4b6jWcWHajLSjMdtnopAjrEHZlx/XD/am03p2L72FtBak7c/WOOEtZIR0O/OB0Byo 92k4pj25AmKTxQtG6KC9t5NZKddfvF+c/xQb0hqNPccjstul8YhmTabbdmfPHDFh+ku0 X1LCO7I9snyMm+OJFPld/inPWStciL6/ysgLBtXTe+CcPcFnzcNlgdDje7EjWPwiD6ee hbzs6UW6hJzGGqnrgfDY8v1maZheTBXqoMTTDUypUQWXZyMH/Vh/TGmVzNrM1p943t0b pVpKX3MWmr9t/8Bip6zaVymPTMLEVzXIBoJ+rWPj4aCuysstbheP774qxf6748t4Sfql 59zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h2si9384850ile.35.2021.06.01.07.08.25; Tue, 01 Jun 2021 07:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234135AbhFAOIA (ORCPT + 99 others); Tue, 1 Jun 2021 10:08:00 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:3326 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234336AbhFAOHv (ORCPT ); Tue, 1 Jun 2021 10:07:51 -0400 Received: from dggeme760-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4FvYjf2rdhz1BGgK; Tue, 1 Jun 2021 22:01:26 +0800 (CST) Received: from localhost.localdomain (10.175.104.82) by dggeme760-chm.china.huawei.com (10.3.19.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 1 Jun 2021 22:06:06 +0800 From: Zheng Yongjun To: , , , , CC: , , Zheng Yongjun Subject: [PATCH -next] drm/etnaviv: Remove unneeded if-null-free check Date: Tue, 1 Jun 2021 22:19:45 +0800 Message-ID: <20210601141945.4131934-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.82] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggeme760-chm.china.huawei.com (10.3.19.106) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eliminate the following coccicheck warning: drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:84:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Zheng Yongjun --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c index b390dd4d60b7..d741b1d735f7 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c @@ -80,8 +80,7 @@ static void etnaviv_gem_prime_release(struct etnaviv_gem_object *etnaviv_obj) /* Don't drop the pages for imported dmabuf, as they are not * ours, just free the array we allocated: */ - if (etnaviv_obj->pages) - kvfree(etnaviv_obj->pages); + kvfree(etnaviv_obj->pages); drm_prime_gem_destroy(&etnaviv_obj->base, etnaviv_obj->sgt); } -- 2.25.1