diff options
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 01a1f6badb53..beea450ee4b2 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2399,7 +2399,8 @@ static int init_one_smi(int intf_num, struct smi_info **smi) | |||
2399 | new_smi->handlers->cleanup(new_smi->si_sm); | 2399 | new_smi->handlers->cleanup(new_smi->si_sm); |
2400 | kfree(new_smi->si_sm); | 2400 | kfree(new_smi->si_sm); |
2401 | } | 2401 | } |
2402 | new_smi->io_cleanup(new_smi); | 2402 | if (new_smi->io_cleanup) |
2403 | new_smi->io_cleanup(new_smi); | ||
2403 | 2404 | ||
2404 | return rv; | 2405 | return rv; |
2405 | } | 2406 | } |
@@ -2518,7 +2519,8 @@ static void __exit cleanup_one_si(struct smi_info *to_clean) | |||
2518 | 2519 | ||
2519 | kfree(to_clean->si_sm); | 2520 | kfree(to_clean->si_sm); |
2520 | 2521 | ||
2521 | to_clean->io_cleanup(to_clean); | 2522 | if (to_clean->io_cleanup) |
2523 | to_clean->io_cleanup(to_clean); | ||
2522 | } | 2524 | } |
2523 | 2525 | ||
2524 | static __exit void cleanup_ipmi_si(void) | 2526 | static __exit void cleanup_ipmi_si(void) |