summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2016-03-09 00:26:17 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-05 16:58:52 +0300
commite2be23712a9c8e3710c9e2684a3204bd20c685d6 (patch)
tree56db0a9c7f91870ffa5498c132c755072ed32b6e /arch
parenta9862c7440f191439a51f77233f89f7e40efe02e (diff)
downloadlinux-e2be23712a9c8e3710c9e2684a3204bd20c685d6.tar.xz
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/cmm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c
index fc44ad0475f8..66e7227469b8 100644
--- a/arch/powerpc/platforms/pseries/cmm.c
+++ b/arch/powerpc/platforms/pseries/cmm.c
@@ -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)