summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorMatt Domsch <Matt_Domsch@dell.com>2005-11-18 01:10:54 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-18 07:49:45 -0800
commit44f080c46e84090daf81b4d142359f8e38d7c5ee (patch)
tree7f2cd28f932bba32c0c28a7c20983c9167f4667e /drivers/char
parent58bb01a9cd72eebf60d00c57b948a76aa7b85727 (diff)
[PATCH] ipmi: missing NULL test for kthread
On IPMI systems with BT interfaces, we don't start the kernel thread, so smi_info->thread is NULL. Test for NULL when stopping the thread, because kthread_stop() doesn't, and an oops ensues otherwise. Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Acked-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index ea89dca3dbb..01a1f6badb5 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2203,7 +2203,7 @@ static void setup_xaction_handlers(struct smi_info *smi_info)
static inline void wait_for_timer_and_thread(struct smi_info *smi_info)
{
- if (smi_info->thread != ERR_PTR(-ENOMEM))
+ if (smi_info->thread != NULL && smi_info->thread != ERR_PTR(-ENOMEM))
kthread_stop(smi_info->thread);
del_timer_sync(&smi_info->si_timer);
}