Skip to contentSkip to conversation

kernel_thread() audit return code i2o_core.c

patch-kj maximilian attems 1 participant 1 message Jun 21, 2004

lore
Share & tools
lore
#0 lore raw

Audited for kernel_thread() return values. Did it backwards last time. *^_^*
Oh, yeah; compiles just fine as module or built-in.

Description : Audited for kernel_thread() return code in i2o_sys_init()

---

 linux-2.6.7-max/drivers/message/i2o/i2o_core.c |    7 +++++++
 1 files changed, 7 insertions(+)
drivers/message/i2o/i2o_core.c renamed from drivers/message/i2o/i2o_core.c~kernel_thread-i2o_core +7 -0
diff -puN drivers/message/i2o/i2o_core.c~kernel_thread-i2o_core drivers/message/i2o/i2o_core.c
@@ -2234,6 +2234,13 @@ rebuild_sys_tab:
 		/* Create a kernel thread to deal with dynamic LCT updates */
 		iop->lct_pid = kernel_thread(i2o_dyn_lct, iop, CLONE_SIGHAND);
 	
+		if (iop->lct_pid < 0) {
+			printk(KERN_ERR "Couldn't spawn thread for %s.\n",
+					iop->name);
+			i2o_sys_shutdown();
+			return;
+		}
+
 		/* Update change ind on DLCT */
 		iop->dlct->change_ind = iop->lct->change_ind;
 

_