<br><br><div class="gmail_quote">On Sun, Jun 3, 2012 at 6:41 PM, Il Han <span dir="ltr"><<a href="mailto:corone.il.han@gmail.com" target="_blank">corone.il.han@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
An uninitialized return value is returned.<br>
If the value is not necessary,<br>
it would be better to return the constant 0.<br>
<br>
Signed-off-by: Il Han <<a href="mailto:corone.il.han@gmail.com">corone.il.han@gmail.com</a>><br>
---<br>
drivers/gpu/drm/nouveau/nv04_fence.c | 3 +--<br>
1 files changed, 1 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c<br>
index abe89db..d4091eb 100644<br>
--- a/drivers/gpu/drm/nouveau/nv04_fence.c<br>
+++ b/drivers/gpu/drm/nouveau/nv04_fence.c<br>
@@ -121,7 +121,6 @@ nv04_fence_create(struct drm_device *dev)<br>
{<br>
struct drm_nouveau_private *dev_priv = dev->dev_private;<br>
struct nv04_fence_priv *priv;<br>
- int ret;<br>
<br>
priv = kzalloc(sizeof(*priv), GFP_KERNEL);<br>
if (!priv)<br>
@@ -136,5 +135,5 @@ nv04_fence_create(struct drm_device *dev)<br>
priv->base.sync = nv04_fence_sync;<br>
priv->base.read = nv04_fence_read;<br>
dev_priv->eng[NVOBJ_ENGINE_FENCE] = &priv->base.engine;<br>
- return ret;<br>
+ return 0;<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.4.1<br>
<br>
--<br>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in<br>
the body of a message to <a href="mailto:majordomo@vger.kernel.org">majordomo@vger.kernel.org</a><br>
More majordomo info at <a href="http://vger.kernel.org/majordomo-info.html" target="_blank">http://vger.kernel.org/majordomo-info.html</a><br>
Please read the FAQ at <a href="http://www.tux.org/lkml/" target="_blank">http://www.tux.org/lkml/</a><br>
</font></span></blockquote></div>Hi All,<div><br></div><div> Why not modify "int ret;" to "int ret = 0;"? Below is the benefit:</div><div> 1. return the constant 0 as wish.</div><div> 2. The variable ret can be used if we want.</div>
<div><br></div><div>Best Regards,</div><div>Bing</div>