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: 15449 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 848B023E10 for ; Thu, 21 Mar 2013 09:01:12 +0000 (UTC) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by fiordland.canonical.com (Postfix) with ESMTP id 0B4D6A184B3 for ; Thu, 21 Mar 2013 09:01:11 +0000 (UTC) Received: by mail-vb0-f49.google.com with SMTP id s24so1724988vbi.8 for ; Thu, 21 Mar 2013 02:01:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=9o9C0uUnOd7gt+yxgTs6vCUg/cmZOYNuuFQ3VNQAxHA=; b=oxh3AdyArYuuL3kuHxkSv5lzO0mhVDIvN8DnvgPeHOhQRZrHPplrDXLshIiRzaNVBA Mp3krbq5v0PAmn4AlM1AqAoolL71Ccv88ZzVPVQ6WpZ0g1UVGE6ElFz/1hKXtRmiaNMU mPBwBTqylrdPOKEtK/03X5lXVENBNpRf9X3nuWkAF1ZgVmguuXVXz4neqmdgipPAFMcR BMyQKsbuVnCud1O5VDX2NWKscEUlQlWe0oHCDOb2ESOQmnMrX85xUGiJGNQdcwOTc5Gi C25G+pF9X0J4eeLw/4pygsNkVfhzHwenmAvMrBW3z+DxJjDhCpLgxbOQLv6ojybcyZsN BuMA== X-Received: by 10.58.224.101 with SMTP id rb5mr12472240vec.17.1363856471339; Thu, 21 Mar 2013 02:01:11 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.233.198 with SMTP id ty6csp50802vec; Thu, 21 Mar 2013 02:01:10 -0700 (PDT) X-Received: by 10.68.134.38 with SMTP id ph6mr13402448pbb.205.1363856469733; Thu, 21 Mar 2013 02:01:09 -0700 (PDT) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id vr5si5564971pab.237.2013.03.21.02.01.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 02:01:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f43.google.com with SMTP id md12so2099327pbc.16 for ; Thu, 21 Mar 2013 02:01:09 -0700 (PDT) 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 Cc: airlied@linux.ie, inki.dae@samsung.com, jy0922.shim@samsung.com, sachin.kamat@linaro.org, patches@linaro.org, Rahul Sharma 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: ALoCoQktU61xKd07UPPasjQe0Qay0TkWYUmkeceAuEhMwLosPJmlgaRMmkUF3qF8B/6AhDu9Aq6S 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; }