Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d15b9b4 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Michael Ellerman
Browse files

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: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarNishanth Aravamudan <nacc@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 6507955c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1801,7 +1801,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;
}