powerpc/pseries/cmm: Remove unneeded variable "ret"
authorzuoqilin <zuoqilin@yulong.com>
Fri, 26 Mar 2021 07:56:19 +0000 (15:56 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 May 2022 09:37:43 +0000 (19:37 +1000)
Remove unneeded variable: "ret".

Signed-off-by: zuoqilin <zuoqilin@yulong.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Just return NOTIFY_OK directly]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210326075619.48-1-zuoqilin1@163.com
arch/powerpc/platforms/pseries/cmm.c

index 45a3a3022a85c9061ed7b724c1424369f83b0ee9..15ed8206c4630db978f99103566ec891856fab20 100644 (file)
@@ -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 = {