drm/exynos: drm_connector: Fix error check condition
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 27 Mar 2013 10:58:43 +0000 (16:28 +0530)
committerInki Dae <daeinki@gmail.com>
Tue, 16 Apr 2013 15:07:27 +0000 (00:07 +0900)
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 <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_connector.c

index 4c5b6859c9ea5cab2aa856ce43d3675f0240235e..8bcc13ac9f73ad484ad113f79c1142efab13ab7b 100644 (file)
@@ -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;
                }