Commit 68f7a049 authored by David Hildenbrand's avatar David Hildenbrand Committed by Michael Ellerman

powerpc/pseries/cmm: Cleanup rc handling in cmm_init()

No need to initialize rc. Also, let's return 0 directly when
succeeding.
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-4-david@redhat.com
parent 022da223
......@@ -669,7 +669,7 @@ static struct notifier_block cmm_mem_nb = {
**/
static int cmm_init(void)
{
int rc = -ENOMEM;
int rc;
if (!firmware_has_feature(FW_FEATURE_CMO))
return -EOPNOTSUPP;
......@@ -692,7 +692,7 @@ static int cmm_init(void)
goto out_unregister_notifier;
if (cmm_disabled)
return rc;
return 0;
cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread");
if (IS_ERR(cmm_thread_ptr)) {
......@@ -700,8 +700,7 @@ static int cmm_init(void)
goto out_unregister_notifier;
}
return rc;
return 0;
out_unregister_notifier:
unregister_memory_notifier(&cmm_mem_nb);
unregister_memory_isolate_notifier(&cmm_mem_isolate_nb);
......
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