powerpc/pseries: Fix error return value in cmm_mem_going_offline()

cmm_mem_going_offline() is (only) called from cmm_memory_cb(), which
sends the return value through notifier_from_errno(). The latter
expects 0 or -errno (notifier_to_errno(notifier_from_errno(x)) is 0
for any x >= 0, so passing a positive value cannot make sense). Hence
negate ENOMEM.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Rasmus Villemoes 2016-03-08 22:26:17 +01:00 committed by Michael Ellerman
parent a9862c7440
commit e2be23712a
1 changed files with 1 additions and 1 deletions

View File

@ -574,7 +574,7 @@ static int cmm_mem_going_offline(void *arg)
cmm_dbg("Failed to allocate memory for list "
"management. Memory hotplug "
"failed.\n");
return ENOMEM;
return -ENOMEM;
}
memcpy(npa, pa_curr, PAGE_SIZE);
if (pa_curr == cmm_page_list)