Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44f080c4 authored by Matt Domsch's avatar Matt Domsch Committed by Linus Torvalds
Browse files

[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: default avatarMatt Domsch <Matt_Domsch@dell.com>
Acked-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 58bb01a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}