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: David Hildenbrand <david@redhat.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20191031142933.10779-3-david@redhat.com
This commit is contained in:
parent
7d82127474
commit
022da22318
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue