From: Corey Minyard <cminyard@mvista.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>
Cc: minyard@acm.org, arnd@arndb.de, gregkh@linuxfoundation.org,
openipmi-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipmi: remve duplicate code in __ipmi_bmc_register()
Date: Mon, 20 Jul 2020 06:32:30 -0500 [thread overview]
Message-ID: <20200720113230.GA2961@minyard.net> (raw)
In-Reply-To: <20200720080838.148737-1-jingxiangfeng@huawei.com>
On Mon, Jul 20, 2020 at 04:08:38PM +0800, Jing Xiangfeng wrote:
> __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).
Looks correct, queued for next release.
Thanks,
-corey
>
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
> ---
> drivers/char/ipmi/ipmi_msghandler.c | 2 --
> 1 file changed, 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;
> --
> 2.17.1
>
prev parent reply other threads:[~2020-07-20 11:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 8:08 [PATCH] ipmi: remve duplicate code in __ipmi_bmc_register() Jing Xiangfeng
2020-07-20 11:32 ` Corey Minyard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200720113230.GA2961@minyard.net \
--to=cminyard@mvista.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jingxiangfeng@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.