[PATCH] workqueue: Fix a compile warning in work_busy

From: Anton Blanchard
Date: Sat Feb 27 2010 - 20:00:59 EST



Ensure ret is initialised to avoid the following warning:

kernel/workqueue.c: In function âwork_busyâ:
kernel/workqueue.c:2697: warning: âretâ may be used uninitialized in this function

Signed-off-by: Anton Blanchard <anton@xxxxxxxxx>
---

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 5871708..6003afd 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2682,7 +2682,7 @@ unsigned int work_busy(struct work_struct *work)
{
struct global_cwq *gcwq = get_work_gcwq(work);
unsigned long flags;
- unsigned int ret;
+ unsigned int ret = 0;

if (!gcwq)
return false;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/