The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Il Han <corone.il.han@gmail.com>
To: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Il Han <corone.il.han@gmail.com>
Subject: [PATCH] drm: An uninitialized return value is returned.
Date: Sun,  3 Jun 2012 19:41:17 +0900	[thread overview]
Message-ID: <1338720077-14936-1-git-send-email-corone.il.han@gmail.com> (raw)

An uninitialized return value is returned.
If the value is not necessary,
it would be better to return the constant 0.

Signed-off-by: Il Han <corone.il.han@gmail.com>
---
 drivers/gpu/drm/nouveau/nv04_fence.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c
index abe89db..d4091eb 100644
--- a/drivers/gpu/drm/nouveau/nv04_fence.c
+++ b/drivers/gpu/drm/nouveau/nv04_fence.c
@@ -121,7 +121,6 @@ nv04_fence_create(struct drm_device *dev)
 {
 	struct drm_nouveau_private *dev_priv = dev->dev_private;
 	struct nv04_fence_priv *priv;
-	int ret;
 
 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
 	if (!priv)
@@ -136,5 +135,5 @@ nv04_fence_create(struct drm_device *dev)
 	priv->base.sync = nv04_fence_sync;
 	priv->base.read = nv04_fence_read;
 	dev_priv->eng[NVOBJ_ENGINE_FENCE] = &priv->base.engine;
-	return ret;
+	return 0;
 }
-- 
1.7.4.1


             reply	other threads:[~2012-06-03 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-03 10:41 Il Han [this message]
2012-06-03 12:26 ` [PATCH] drm: An uninitialized return value is returned bing deng
2012-06-03 13:26   ` richard -rw- weinberger

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=1338720077-14936-1-git-send-email-corone.il.han@gmail.com \
    --to=corone.il.han@gmail.com \
    --cc=airlied@linux.ie \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox