Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3010691pxx; Sun, 1 Nov 2020 19:12:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwH0zOrCJN5tntV3jmcxRtZ8yEZQaLrte1lb6x73TppCh83+6Pblw/78QDzUWcR1kFmEVxH X-Received: by 2002:a05:6402:1583:: with SMTP id c3mr330107edv.273.1604286743526; Sun, 01 Nov 2020 19:12:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604286743; cv=none; d=google.com; s=arc-20160816; b=wGCKmtJ1Q4eGSAlm3uVLbe+j5GnS0jl2UzCV24H5v7DoUJEV6wk5kQLxh8WV4JG4/1 0kwZq2ncusJlMBvwkQJ3SUKt1HEJS3ZIGrOUOLcY/6i6N54lz4hwTyWxNzlIGw6S27c6 1sg+28cxMLfMbw1wF/HLERX/JtqHeVjTMJRkPrKhWDEhuW0ttK8hCUlk2jN0mzKujjoo 6uHD1UN7vI2+W9N4+zDMhNiYQw4n1ws7HNOpP1n3GBL4yUKSYq/A2f98DjJPU+Vkofps zbihJAoXQme1DigbRkp8DB4ZGmTx04Jl2RgGk9xp9gycwE3S1V9Xq7zIpAJCV6ILW/gp PovA== 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=EI7Ph+wckG3Q/K3O/zPF3wAurazN8gEh4ev+teIjMTo=; b=JepAKMUkrbFFbTtwJS+9M/705BxpqngA6doqHMxUFpIsMnwokMPBufLXZ3lFpya2Hd SsXEClzIH81h+eADj9LQpNBCDtDPKKeqva5eDgxKvgWNUCuJlw2oXSi0nZ0fX0Lvtbe0 s/Ixap0rg6anPllFDtGj8g3Knipr9w8YZlOmbfjDMyrrPEpy1I9IuUfJvcV9QiQpq41K kqXfF0Jb/w/vmh8lDRR+T2oidVpb6Vh/7r77webdIZzs6aUSVQcGO2Nno31ExCq9L0dZ wfY43YeAQ3X8UFvJm9zIvRUsvCBGgxvzEgQf82EpU2ewHsfTKpBB0oVYm2aSo3oBkrv0 0Qsw== 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 s8si10831337edc.481.2020.11.01.19.11.43; Sun, 01 Nov 2020 19:12:23 -0800 (PST) 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 S1727555AbgKBDHp (ORCPT + 99 others); Sun, 1 Nov 2020 22:07:45 -0500 Received: from mail-m17613.qiye.163.com ([59.111.176.13]:50023 "EHLO mail-m17613.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727450AbgKBDHp (ORCPT ); Sun, 1 Nov 2020 22:07:45 -0500 Received: from ubuntu.localdomain (unknown [58.213.83.157]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id DF9D3482ACC; Mon, 2 Nov 2020 11:07:42 +0800 (CST) From: Bernard Zhao To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Bernard Zhao Subject: [PATCH] gpu/drm: delete same check in if condition Date: Sun, 1 Nov 2020 19:07:36 -0800 Message-Id: <20201102030736.3833-1-bernard@vivo.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZSk5KSU9MSx5NT0JKVkpNS09JQ01PTUhLQ0pVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS09ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NAw6Qzo5Fj8YNyEUMywDEiw5 DSpPCTVVSlVKTUtPSUNNT01ITkpMVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlOQ1VJ SkhVQ0hVSk5MWVdZCAFZQUpCTko3Bg++ X-HM-Tid: 0a7586ecbc3693bakuwsdf9d3482acc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In function drm_bridge_connector_get_modes_edid, drm_edid_is_valid will check weather (!edid), no need to check again in the if branch. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/drm_bridge_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index a58cbde59c34..791379816837 100644 --- a/drivers/gpu/drm/drm_bridge_connector.c +++ b/drivers/gpu/drm/drm_bridge_connector.c @@ -241,7 +241,7 @@ static int drm_bridge_connector_get_modes_edid(struct drm_connector *connector, goto no_edid; edid = bridge->funcs->get_edid(bridge, connector); - if (!edid || !drm_edid_is_valid(edid)) { + if (!drm_edid_is_valid(edid)) { kfree(edid); goto no_edid; } -- 2.29.0