From patchwork Thu Mar 21 08:49:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2311901 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 5238540213 for ; Thu, 21 Mar 2013 10:06:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B01AE5EE0 for ; Thu, 21 Mar 2013 03:06:43 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F635E5C54 for ; Thu, 21 Mar 2013 02:01:08 -0700 (PDT) Received: by mail-pd0-f181.google.com with SMTP id q10so988970pdj.40 for ; Thu, 21 Mar 2013 02:01:09 -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=9o9C0uUnOd7gt+yxgTs6vCUg/cmZOYNuuFQ3VNQAxHA=; b=PUennsL6Z+ra/xQ386NCqPIYFZ0PoJa8SJZdNUuxjke6Ctm/pqKBm75gyWc9yKdDhC mJJsDjR5Il3ZDIZeSX9unI4hCn9ucI+t0OPiQIF0vcnLHrSQFFw9u2vNddb+PAsLITO1 pDpz9dEn2oKhTxeQ6AhbV7Hv/yefLlEr3PYGYO5+MQwlANpCxoHbylDG8226vT6gKiYz cBGkGuBVRKvA1HvzY9Ek2UosAoYdKPqTskLHGA9YGswS6WFL9NBiHzSK90r+KSseTpqj S35u44XSh4/l3gMkGC7ptLmwRGyV95qZrB6Gr+ZGjRP+XeErlbRu9k1IBzAqEBkAQVdV IYVw== X-Received: by 10.68.189.99 with SMTP id gh3mr13665078pbc.203.1363856469125; Thu, 21 Mar 2013 02:01:09 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id u9sm5736794paf.22.2013.03.21.02.01.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 21 Mar 2013 02:01:08 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/1] drm/exynos: drm_connector: Fix error check condition Date: Thu, 21 Mar 2013 14:19:59 +0530 Message-Id: <1363855799-18176-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQk6ptjXUlDAuLHg+w5+eyH887+xtsOniyhGUD2b9fYY0mu0M7ceZsHSt/gyMDY5Ji8vsBes X-Mailman-Approved-At: Thu, 21 Mar 2013 03:04:16 -0700 Cc: patches@linaro.org, sachin.kamat@linaro.org, Rahul Sharma 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..56ac35f 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 == 0) { DRM_ERROR("Add edid modes failed %d\n", count); goto out; }