Message ID | 20191031142933.10779-4-david@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 68f7a04932bbcd72973fd58b16a817f4bf99171a |
Headers | show |
Series | powerpc/pseries: CMM: Implement balloon compaction and remove isolate notifier | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (904ea5d546fe35c670396e4813e15c8b075b69f1) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 25 lines checked |
diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index fab049d3ea1e..738eb1681d40 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++ b/arch/powerpc/platforms/pseries/cmm.c @@ -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);
No need to initialize rc. Also, let's return 0 directly when succeeding. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arun KS <arunks@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Hildenbrand <david@redhat.com> --- arch/powerpc/platforms/pseries/cmm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)