powerpc/numa: check error return from proc_create
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.
Suggested-by Michael Ellerman <[email protected]>
Signed-off-by Nishanth Aravamudan <[email protected]>
arch/powerpc/mm/numa.c +2 -1
@@ -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 ; }