From: Gavin Shan Date: Mon, 8 Oct 2012 23:29:27 +0000 (-0700) Subject: mm/vmscan: fix error number for failed kthread X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d5dc0ad928fb9e972001e552597fd0b794863f34;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm/vmscan: fix error number for failed kthread Fix the return value while failing to create the kswapd kernel thread. Also, the error message is prioritized as KERN_ERR. Signed-off-by: Gavin Shan Signed-off-by: Wanpeng Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index f6fdae7a8d4c..d16bf5a53266 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3126,9 +3126,9 @@ int kswapd_run(int nid) if (IS_ERR(pgdat->kswapd)) { /* failure at boot is fatal */ BUG_ON(system_state == SYSTEM_BOOTING); - printk("Failed to start kswapd on node %d\n",nid); pgdat->kswapd = NULL; - ret = -1; + pr_err("Failed to start kswapd on node %d\n", nid); + ret = PTR_ERR(pgdat->kswapd); } return ret; }