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: 15696 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 B4D0C23DEE for ; Wed, 27 Mar 2013 11:10:08 +0000 (UTC) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by fiordland.canonical.com (Postfix) with ESMTP id 7E39FA19D55 for ; Wed, 27 Mar 2013 11:10:08 +0000 (UTC) Received: by mail-vc0-f175.google.com with SMTP id hf12so6304569vcb.20 for ; Wed, 27 Mar 2013 04:10:08 -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=Yk/ay8OHAJXyd0ZgJ7ti147KBkfCufW2jbHW+9Y48/I=; b=YkLuOS4VhnMiZr3GcR0oyaBPxuPGtZrIhf4IJDziQAsHnYL0k440cYdMn3/R2wG9Ev /ozt6p6tCCuhKKPIXRwtviyIAHbptKcZ/73qqPVxacGVVZzekb1nDaGVMuoQzLVi+3Sg Jol4PSTQ84Y8vfHoo/0RgRxxHlaSLuFo9nifZ0vFZy7SojPg9iEndtf56MOPh3OgZH3+ eZiWNwioEUR9RlDiMnZRu+zxFiXIeQjTujvoQlLCiI0+a8GJDj9XrpkYaEm8H7pGZGpq lJwbfpaa8ebm4+lNp4QRaJUQ6B38rgHytJZn79APs9u7eLrL5LNZadWfmq2BeT6kj47c jOKA== X-Received: by 10.52.76.103 with SMTP id j7mr19641986vdw.90.1364382608020; Wed, 27 Mar 2013 04:10:08 -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.59.4.204 with SMTP id cg12csp110762ved; Wed, 27 Mar 2013 04:10:07 -0700 (PDT) X-Received: by 10.68.129.135 with SMTP id nw7mr28337798pbb.58.1364382606920; Wed, 27 Mar 2013 04:10:06 -0700 (PDT) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx.google.com with ESMTPS id tx10si21434638pbc.122.2013.03.27.04.10.06 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Mar 2013 04:10:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.44 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.44 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-pa0-f44.google.com with SMTP id bi5so2101601pad.17 for ; Wed, 27 Mar 2013 04:10:06 -0700 (PDT) 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 Cc: inki.dae@samsung.com, sachin.kamat@linaro.org, patches@linaro.org, Rahul Sharma 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: ALoCoQmYn4JumEZhXMuw/Er7IGGNWmUnduLLVyJYhG9w4mR3jxNwp35h/aFuRpK2NLdj1pvK0vNB 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; }