From: Sachin Kamat Date: Wed, 27 Mar 2013 10:58:43 +0000 (+0530) Subject: drm/exynos: drm_connector: Fix error check condition X-Git-Tag: firefly_0821_release~3680^2~443^2~61^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=81ed7039f3cf656107a277fd7e3ab8f27d442015;p=firefly-linux-kernel-4.4.55.git drm/exynos: drm_connector: Fix error check condition drm_add_edid_modes() returns 0 upon failure to find any modes. Hence check for 0 and not less than 0. Signed-off-by: Sachin Kamat Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c index 4c5b6859c9ea..8bcc13ac9f73 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c @@ -124,7 +124,7 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector) } count = drm_add_edid_modes(connector, edid); - if (count < 0) { + if (!count) { DRM_ERROR("Add edid modes failed %d\n", count); goto out; }