summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/cmm.c
diff options
context:
space:
mode:
authorPrarit Bhargava <prarit@redhat.com>2011-01-13 07:09:01 +0300
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-02 08:50:06 +0300
commit7e26065d8b11babc948262b92cd989fcc7062653 (patch)
treebc7a7753201764f3e3cab7b7cc654a2e95c171d6 /arch/powerpc/platforms/pseries/cmm.c
parentae39573a19e35122bd431a4f5c889823209168c7 (diff)
downloadlinux-7e26065d8b11babc948262b92cd989fcc7062653.tar.xz
powerpc/pseries: Cleanup use of notifier_from_errno()
Minor cleanup of notifier_from_errno() in powerpc. notifier_from_errno() now contains the if(ret)/else conditional. There is no need to do it in the powerpc code. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/cmm.c')
-rw-r--r--arch/powerpc/platforms/pseries/cmm.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c
index f4803868642c..3cafc306b971 100644
--- a/arch/powerpc/platforms/pseries/cmm.c
+++ b/arch/powerpc/platforms/pseries/cmm.c
@@ -508,12 +508,7 @@ static int cmm_memory_isolate_cb(struct notifier_block *self,
if (action == MEM_ISOLATE_COUNT)
ret = cmm_count_pages(arg);
- if (ret)
- ret = notifier_from_errno(ret);
- else
- ret = NOTIFY_OK;
-
- return ret;
+ return notifier_from_errno(ret);
}
static struct notifier_block cmm_mem_isolate_nb = {
@@ -635,12 +630,7 @@ static int cmm_memory_cb(struct notifier_block *self,
break;
}
- if (ret)
- ret = notifier_from_errno(ret);
- else
- ret = NOTIFY_OK;
-
- return ret;
+ return notifier_from_errno(ret);
}
static struct notifier_block cmm_mem_nb = {