[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201102030736.3833-1-bernard@vivo.com>
Date: Sun, 1 Nov 2020 19:07:36 -0800
From: Bernard Zhao <bernard@...o.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com, Bernard Zhao <bernard@...o.com>
Subject: [PATCH] gpu/drm: delete same check in if condition
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 <bernard@...o.com>
---
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
Powered by blists - more mailing lists