Skip to contentSkip to conversation

mm/zsmalloc: remove uninitialized_var

PATCH New Mahendran Ganesh 1 participant 1 message Nov 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/zsmalloc: remove uninitialized_var

uninitialized_var() is not recommended to be used to avoid compiler warnings
https://lkml.org/lkml/2012/10/27/71

So this patch initializes ret with *NOTIFY_OK*.

---
 mm/zsmalloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zsmalloc.c +1 -1
index bb55736..480fa4c 100644
@@ -897,7 +897,7 @@ static void zs_unregister_cpu_notifier(void)
 
 static int zs_register_cpu_notifier(void)
 {
-	int cpu, uninitialized_var(ret);
+	int cpu, ret = NOTIFY_OK;
 
 	cpu_notifier_register_begin();
 
Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>