From 701c31672a0b8f3694579e82f4c3fd8a1f9f4d5b Mon Sep 17 00:00:00 2001 From: zuoqilin Date: Fri, 26 Mar 2021 15:56:19 +0800 Subject: [PATCH] powerpc/pseries/cmm: Remove unneeded variable "ret" Remove unneeded variable: "ret". Signed-off-by: zuoqilin Signed-off-by: Christophe Leroy [mpe: Just return NOTIFY_OK directly] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210326075619.48-1-zuoqilin1@163.com --- arch/powerpc/platforms/pseries/cmm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index 45a3a3022a85..15ed8206c463 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++ b/arch/powerpc/platforms/pseries/cmm.c @@ -475,8 +475,6 @@ static struct notifier_block cmm_reboot_nb = { static int cmm_memory_cb(struct notifier_block *self, unsigned long action, void *arg) { - int ret = 0; - switch (action) { case MEM_GOING_OFFLINE: mutex_lock(&hotplug_mutex); @@ -493,7 +491,7 @@ static int cmm_memory_cb(struct notifier_block *self, break; } - return notifier_from_errno(ret); + return NOTIFY_OK; } static struct notifier_block cmm_mem_nb = {