diff options
author | Jing Xiangfeng <jingxiangfeng@huawei.com> | 2020-07-20 16:08:38 +0800 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2020-07-20 06:31:50 -0500 |
commit | a7f0f92aa82fced7df891282b67387d247e44ca8 (patch) | |
tree | 2242d637961bd39a8ca7303f7bb3ed05074039fc /drivers/char | |
parent | 29a54910152adf9bba4eefbe5e4cd071291775a4 (diff) | |
download | linux-a7f0f92aa82fced7df891282b67387d247e44ca8.tar.bz2 |
ipmi: remve duplicate code in __ipmi_bmc_register()
__ipmi_bmc_register() jumps to the label 'out_free_my_dev_name' in an
error path. So we can remove duplicate code in the if (rv).
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Message-Id: <20200720080838.148737-1-jingxiangfeng@huawei.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index e1b22fe0916c..737c0b6b24ea 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -3080,8 +3080,6 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf, rv = sysfs_create_link(&bmc->pdev.dev.kobj, &intf->si_dev->kobj, intf->my_dev_name); if (rv) { - kfree(intf->my_dev_name); - intf->my_dev_name = NULL; dev_err(intf->si_dev, "Unable to create symlink to bmc: %d\n", rv); goto out_free_my_dev_name; |