From patchwork Sat Mar 2 10:23:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2207351 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id F2F52DF230 for ; Sat, 2 Mar 2013 17:07:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2DD3E606B for ; Sat, 2 Mar 2013 09:07:18 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-da0-f45.google.com (mail-da0-f45.google.com [209.85.210.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F391E5C31 for ; Sat, 2 Mar 2013 02:33:39 -0800 (PST) Received: by mail-da0-f45.google.com with SMTP id v40so1788025dad.18 for ; Sat, 02 Mar 2013 02:33:39 -0800 (PST) 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:in-reply-to :references:x-gm-message-state; bh=Bewn7cRCkpLmaM2WwSu6agH94JcxQde4/nFqW5Qz7WE=; b=Yyxs0Vo+jegSqD4PwG4oFy+mdTlwlxkrsPuQpkoYFJlYWtKRL+qsOlXnQvxw5PlWyW ek3eFAjOh0ifvhkrSrbb4Dif06/DA8FMIkEu/EAp9WbcZyu+oI39pojGraWRvlBs1Vev /b+RcrqM2nXJC9jgys+0prBK3oYzfJWk9L35WSUAB4j9KqBPgPoHZZhJ3RaIGYhdXOwC iiJ6/n/970HLvvvQrhpEbbgIWqFCU8u+TbBDSnMapq2peMAAFjGm7n1MD+iZAwMBvFLC mOxk2SpcXgHOI0hR0LwX+urQ13oRaC9mW5eOYXygJAgYT1PBmENaVLINkNfohWWup4us lyXg== X-Received: by 10.66.218.36 with SMTP id pd4mr22678850pac.115.1362220419462; Sat, 02 Mar 2013 02:33:39 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id z8sm4123670pbt.39.2013.03.02.02.33.36 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 02 Mar 2013 02:33:38 -0800 (PST) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm/tilcdc: Fix an incorrect condition Date: Sat, 2 Mar 2013 15:53:06 +0530 Message-Id: <1362219789-6146-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1362219789-6146-1-git-send-email-sachin.kamat@linaro.org> References: <1362219789-6146-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQmxjptAfBTT4JyregKXhaDuD3mos1JzaPpjJOVZJs3n931djUCyk918G06/IcfKMJVwVJwe X-Mailman-Approved-At: Sat, 02 Mar 2013 09:05:35 -0800 Cc: sachin.kamat@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 Instead of checking if num_encoders is zero, it is being assigned 0. Convert the assignment to a check. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index c5b592d..bfac582 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -75,7 +75,7 @@ static int modeset_init(struct drm_device *dev) mod->funcs->modeset_init(mod, dev); } - if ((priv->num_encoders = 0) || (priv->num_connectors == 0)) { + if ((priv->num_encoders == 0) || (priv->num_connectors == 0)) { /* oh nos! */ dev_err(dev->dev, "no encoders/connectors found\n"); return -ENXIO;