From: Ainux.Wang Date: Fri, 16 Jul 2021 01:56:15 +0000 (+0800) Subject: drm/ast: Zero is missing in detect function X-Git-Tag: v5.15-rc1~148^2~22^2~22 X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=572994bf18ff4512207164b3643a61909dcaa603;p=linux%2F.git drm/ast: Zero is missing in detect function The function ast_get_modes() will also return 0, when it try to get the edid, but it also do not get the edid. Signed-off-by: Ainux.Wang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210716015615.9150-1-ainux.wang@gmail.com --- diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index f5d58c3088fe..f32da620a123 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -1298,7 +1298,7 @@ static enum drm_connector_status ast_connector_detect(struct drm_connector int r; r = ast_get_modes(connector); - if (r < 0) + if (r <= 0) return connector_status_disconnected; return connector_status_connected;