All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Ding <dinggnu@gmail.com>
To: David Airlie <airlied@linux.ie>, Ben Skeggs <bskeggs@redhat.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Cong Ding <dinggnu@gmail.com>
Subject: [PATCH] gpu: drm/nouveau/core/engine/disp/dacnv50.c: fix var uninit issue
Date: Thu,  6 Dec 2012 17:23:49 +0000	[thread overview]
Message-ID: <1354814636-21925-1-git-send-email-dinggnu@gmail.com> (raw)

the variable "ret" might be uninitialized in the "default" branch of "switch"

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 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;
-- 
1.7.4.5

                 reply	other threads:[~2012-12-06 17:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354814636-21925-1-git-send-email-dinggnu@gmail.com \
    --to=dinggnu@gmail.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.