From patchwork Thu Dec 6 17:23:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cong Ding X-Patchwork-Id: 1849171 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 B406E400ED for ; Fri, 7 Dec 2012 08:50:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A0AF6E615E for ; Fri, 7 Dec 2012 00:50:40 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f42.google.com (mail-qa0-f42.google.com [209.85.216.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 73C24E5CBF for ; Thu, 6 Dec 2012 09:24:20 -0800 (PST) Received: by mail-qa0-f42.google.com with SMTP id hg5so973674qab.15 for ; Thu, 06 Dec 2012 09:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=TMpPHKqRqeLQReAMrFBVgp6tfam+UKKSqn52pxJ5huc=; b=NUzas/vQU6mYfjDgKMmJ9tmt3KgKSzW6gtUsXAERI4YugTHgIC/9oqyJvwgmMIMyAu eg85UTYNmCPEG33AMoT/Jb3rq05Z/5NpWhZHLhYU4H68FFxNaF4ILmcFZL/h+N2cLvUS fwvqKon2IRGB583+XJzDXLR+nMO42/44A9UfEbTr7vrmYcKjHNkWDBcWLt4oBFZbR7bA 2iHUbUcE1wqx7iZtHBw+NxoK9XQdWTW+8YpMWMUEuc1GbkwuPbNhiEFJmp9s2cmPFxvs r7J4BJTDQLnxeCQedaqlj31WXexfJqwAJspTXr/iqBFdWyGwGJRz5AG7Bh5tvVnVC9sE AyYw== Received: by 10.49.59.48 with SMTP id w16mr4076003qeq.38.1354814659876; Thu, 06 Dec 2012 09:24:19 -0800 (PST) Received: from localhost.localdomain (ec2-54-243-39-165.compute-1.amazonaws.com. [54.243.39.165]) by mx.google.com with ESMTPS id h8sm5569146qap.17.2012.12.06.09.24.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 09:24:18 -0800 (PST) From: Cong Ding To: David Airlie , Ben Skeggs , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpu: drm/nouveau/core/engine/disp/dacnv50.c: fix var uninit issue Date: Thu, 6 Dec 2012 17:23:49 +0000 Message-Id: <1354814636-21925-1-git-send-email-dinggnu@gmail.com> X-Mailer: git-send-email 1.7.4.5 X-Mailman-Approved-At: Fri, 07 Dec 2012 00:49:19 -0800 Cc: Cong Ding 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 the variable "ret" might be uninitialized in the "default" branch of "switch" Signed-off-by: Cong Ding --- drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c index d0817d9..ae19dec 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c @@ -64,7 +64,7 @@ nv50_dac_mthd(struct nouveau_object *object, u32 mthd, void *args, u32 size) struct nv50_disp_priv *priv = (void *)object->engine; const u8 or = (mthd & NV50_DISP_DAC_MTHD_OR); u32 *data = args; - int ret; + int ret = 0; if (size < sizeof(u32)) return -EINVAL;