From patchwork Wed Mar 27 10:58:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2350161 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 4A3BB3FD40 for ; Wed, 27 Mar 2013 12:24:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1DDDBE6097 for ; Wed, 27 Mar 2013 05:24:30 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 19AFCE5C79 for ; Wed, 27 Mar 2013 04:10:07 -0700 (PDT) Received: by mail-pa0-f43.google.com with SMTP id hz11so937505pad.30 for ; Wed, 27 Mar 2013 04:10:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=Yk/ay8OHAJXyd0ZgJ7ti147KBkfCufW2jbHW+9Y48/I=; b=ECvCuNl6uT/VF2oaFyu33Xkb8lt2AGhZzQpZFTrcL2/Si5GN1Oupk/MXG8jBsz+8AL mpnJBY9/JZp7qY2FTJQiQRkrEQ3omo+iWsORRXL2jiVy6x260gVLwHnDua5+NEW8N7gF crW+l3ombGJIz3qBfLs8XN56dE74S73SkOaopuCn9hbeFtOvIxk6ulugsNcYmDto9vjt 8ulAwLXbMgN+BMvLoPr7Ig5XUE6mPO98HnSMrw2OGiTH5iLm9D5cZ87+AxlupJiAP/Xc gLgnggg0biN9s75j8DPkER4Jwoi/oby6PDuG8+DeW9xWve94LSki6pJM+IhUPVL8L101 CcdA== X-Received: by 10.66.49.202 with SMTP id w10mr28867560pan.174.1364382606482; Wed, 27 Mar 2013 04:10:06 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id qa6sm21098531pbc.46.2013.03.27.04.10.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 27 Mar 2013 04:10:05 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH Resend] drm/exynos: drm_connector: Fix error check condition Date: Wed, 27 Mar 2013 16:28:43 +0530 Message-Id: <1364381923-12919-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlQiqS1MUIENUxEKUpjjho1uVbM96qf4kgwTUkdiGfzrANhrtuPE267hl5yU4Yu4P23Fq5Q X-Mailman-Approved-At: Wed, 27 Mar 2013 05:21:12 -0700 Cc: sachin.kamat@linaro.org, Rahul Sharma , patches@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org 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 Cc: Rahul Sharma --- drivers/gpu/drm/exynos/exynos_drm_connector.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c index 4c5b685..8bcc13a 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; }