From: Bernard Zhao Date: Mon, 2 Nov 2020 03:07:36 +0000 (-0800) Subject: gpu/drm: delete same check in if condition X-Git-Tag: accepted/tizen/unified/20230118.172025~6402^2~28^2~1534 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95d7a1a6f867f5e6acf62e07a463e0bea1d47b68;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201102030736.3833-1-bernard@vivo.com --- diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index a58cbde..7913798 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; }