summaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_si_intf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index ea89dca..beea450 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);
}
@@ -2399,7 +2399,8 @@ static int init_one_smi(int intf_num, struct smi_info **smi)
new_smi->handlers->cleanup(new_smi->si_sm);
kfree(new_smi->si_sm);
}
- new_smi->io_cleanup(new_smi);
+ if (new_smi->io_cleanup)
+ new_smi->io_cleanup(new_smi);
return rv;
}
@@ -2518,7 +2519,8 @@ static void __exit cleanup_one_si(struct smi_info *to_clean)
kfree(to_clean->si_sm);
- to_clean->io_cleanup(to_clean);
+ if (to_clean->io_cleanup)
+ to_clean->io_cleanup(to_clean);
}
static __exit void cleanup_ipmi_si(void)
OpenPOWER on IntegriCloud