Skip to contentSkip to conversation

powerpc/numa: check error return from proc_create

PATCH New Nishanth Aravamudan 1 participant 1 message Oct 9, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/numa: check error return from proc_create

proc_create can fail, we should check the return value and pass up the failure.

arch/powerpc/mm/numa.c +2 -1
index d7737a542fd7..e28c21ba862d 100644
@@ -1808,7 +1808,8 @@ static const struct file_operations topology_ops = {
 static int topology_update_init(void)
 {
 	start_topology_update();
-	proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops);
+	if (!proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops))
+		return -ENOMEM;
 
 	return 0;
 }