From: Prarit Bhargava Date: Thu, 13 Jan 2011 04:09:01 +0000 (+0000) Subject: powerpc/pseries: Cleanup use of notifier_from_errno() X-Git-Tag: v2.6.39-rc1~430^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e26065d8b11babc948262b92cd989fcc7062653;p=platform%2Fkernel%2Flinux-3.10.git 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 Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index f480386..3cafc30 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 = {