Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1012263ybh; Wed, 22 Jul 2020 20:29:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykGKRPWKn/LgLD28OSONO+90V/7O3evhxFLQfF3aWGDxE8kCKUGkYaVocTAFb8NJqVNq3G X-Received: by 2002:a17:906:8602:: with SMTP id o2mr2526197ejx.277.1595474952653; Wed, 22 Jul 2020 20:29:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595474952; cv=none; d=google.com; s=arc-20160816; b=D6/rBIT47vbVbpLjAgrGhKPkKTYayxwg8x6WiQtw57KCQyI0qzUZwV7Ub38wb7iNUh NTo+TX8JNavdPpQMHL4sZuBHY7E8ecyECW5+MgHv8Vb2wTCxWiGQcNYGpHALDwUZ7Oii SQcLFur1DeyW4Gz3WqNQARImzW06urTORpKEZQoK07ONOcFP+RN7FZLsiH0P17bKejXO zOqI6ojYOo3gDmpUA1Dp8ns/ch29WxKX5inhFDFvEh0FLK32js3FwMy3yvtCufTx13i1 ifJD445VDQaodfhu9kz0wRlE8daz+Dj9I1ZwYygj5wk4nlNq3lMIMxcuqsfs+Uo1fCF0 jiow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=GbQCqSOGNxJOQ3AfceqDMJ5/RBRo2DW5j0LNVaCdxZI=; b=Q79llPEqeZvI6HkMhrHLQ5HXId7muAzKPpjtVFyYHDhbSnyYQJkpiEbWGD45h42/2X JSn0kudVFQmuLm5wF2rKSD+7wGKzL+l6amhQF7m97tkQVeoJw+nvch8REPxhJTXiJWLQ qjARFMkhqzgAErO8p43xeCrrNgvSor+WuQ75GK/+RyQRX/HZnQJil0bY/6o50dY29FP5 Ck9oDl3h+AP0XPZBShJtIbT9SxhqTHth1fhcc+LgUaRP5o9JkfTt0a2xy3lA7fQiwE8d ZIF4BPf6ZQM2+aQxKwTHhJKbTTtupkcbPBdea6GoFjxGN5u/GnJ+GbVNrPSjskDzdWkf CgzQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si1168341edr.284.2020.07.22.20.28.49; Wed, 22 Jul 2020 20:29:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387640AbgGWD0S (ORCPT + 99 others); Wed, 22 Jul 2020 23:26:18 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8256 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729401AbgGWD0R (ORCPT ); Wed, 22 Jul 2020 23:26:17 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 75FB77FF8DAD8F8D1986; Thu, 23 Jul 2020 11:26:14 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 23 Jul 2020 11:26:10 +0800 From: Li Heng To: , CC: , , Subject: [PATCH -next 1/2] drm: Remove redundant NULL check Date: Thu, 23 Jul 2020 11:27:42 +0800 Message-ID: <1595474863-33112-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix below warnings reported by coccicheck: ./drivers/gpu/drm/drm_drv.c:819:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: 5dad34f3c444 ("drm: Cleanups after drmm_add_final_kfree rollout") Signed-off-by: Li Heng --- drivers/gpu/drm/drm_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index bc38322..13068fd 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -815,8 +815,7 @@ static void drm_dev_release(struct kref *ref) drm_managed_release(dev); - if (dev->managed.final_kfree) - kfree(dev->managed.final_kfree); + kfree(dev->managed.final_kfree); } /** -- 2.7.4