Skip to contentSkip to conversation

Check the return value of kthread_run().

S390 Martin Schwidefsky 1 participant 1 message Jan 26, 2007 s390

lore
Share & tools
lore
#0 lore raw

From: Akinobu Mita <[email protected]>

[S390] Check the return value of kthread_run().

---

 drivers/s390/s390mach.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)
drivers/s390/s390mach.c +5 -1
diff -urpN linux-2.6/drivers/s390/s390mach.c linux-2.6-patched/drivers/s390/s390mach.c
@@ -525,7 +525,11 @@ arch_initcall(machine_check_init);
 static int __init
 machine_check_crw_init (void)
 {
-	kthread_run(s390_collect_crw_info, &m_sem, "kmcheck");
+	struct task_struct *task;
+
+	task = kthread_run(s390_collect_crw_info, &m_sem, "kmcheck");
+	if (IS_ERR(task))
+		return PTR_ERR(task);
 	ctl_set_bit(14, 28);	/* enable channel report MCH */
 	return 0;
 }