Skip to content

Commit

Permalink
ipmi: remve duplicate code in __ipmi_bmc_register()
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
Jing Xiangfeng authored and Corey Minyard committed Jul 20, 2020
1 parent 29a5491 commit a7f0f92
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a7f0f92

Please sign in to comment.