From: Juergen Gross <jgross@suse.com>
To: zhong jiang <zhongjiang@huawei.com>, boris.ostrovsky@oracle.com
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen: remove unnecessary condition check before kfree
Date: Mon, 10 Sep 2018 11:52:16 +0200 [thread overview]
Message-ID: <12d9b430-e08a-3e28-5289-028f6b395d11@suse.com> (raw)
In-Reply-To: <1536416318-34106-1-git-send-email-zhongjiang@huawei.com>
On 08/09/18 16:18, zhong jiang wrote:
> kfree has taken null pointer into account. So just remove the
> condition check before kfree.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> drivers/xen/xen-acpi-processor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c
> index fbb9137..7e1d49e 100644
> --- a/drivers/xen/xen-acpi-processor.c
> +++ b/drivers/xen/xen-acpi-processor.c
> @@ -268,7 +268,7 @@ static int push_pxx_to_hypervisor(struct acpi_processor *_pr)
> pr_warn("(_PXX): Hypervisor error (%d) for ACPI CPU%u\n",
> ret, _pr->acpi_id);
> err_free:
> - if (!IS_ERR_OR_NULL(dst_states))
> + if (!IS_ERR(dst_states))
This is just a change of the condition, not a removal.
I don't think change is worth it.
Juergen
next prev parent reply other threads:[~2018-09-10 9:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-08 14:18 zhong jiang
2018-09-10 9:52 ` Juergen Gross [this message]
2018-09-10 13:52 ` zhong jiang
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=12d9b430-e08a-3e28-5289-028f6b395d11@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=zhongjiang@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome