Commit 022da223 authored by David Hildenbrand's avatar David Hildenbrand Committed by Michael Ellerman

powerpc/pseries/cmm: Report errors when registering notifiers fails

If we don't set the rc, we will return "0", making it look like we
succeeded.
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191031142933.10779-3-david@redhat.com
parent 7d821274
......@@ -683,8 +683,12 @@ static int cmm_init(void)
if ((rc = cmm_sysfs_register(&cmm_dev)))
goto out_reboot_notifier;
if (register_memory_notifier(&cmm_mem_nb) ||
register_memory_isolate_notifier(&cmm_mem_isolate_nb))
rc = register_memory_notifier(&cmm_mem_nb);
if (rc)
goto out_unregister_notifier;
rc = register_memory_isolate_notifier(&cmm_mem_isolate_nb);
if (rc)
goto out_unregister_notifier;
if (cmm_disabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment