提交 2068db53 编写于 作者: C Corey Minyard

ipmi: Cleanup oops on initialization failure

Commit 93c303d2 "ipmi_si: Clean up shutdown a bit" didn't
copy the behavior of the cleanup in one spot, it needed to
check for a non-NULL interface before cleaning it up.
Reported-by: NMeelis Roos <mroos@linux.ee>
Signed-off-by: NCorey Minyard <cminyard@mvista.com>
Tested-by: NMeelis Roos <mroos@linux.ee>
上级 9ffc59d5
......@@ -2088,8 +2088,10 @@ static int try_smi_init(struct smi_info *new_smi)
return 0;
out_err:
ipmi_unregister_smi(new_smi->intf);
new_smi->intf = NULL;
if (new_smi->intf) {
ipmi_unregister_smi(new_smi->intf);
new_smi->intf = NULL;
}
kfree(init_name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册