From: zhong jiang <zhongjiang@huawei.com>
To: Juergen Gross <jgross@suse.com>
Cc: <boris.ostrovsky@oracle.com>, <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 21:52:53 +0800 [thread overview]
Message-ID: <5B967735.1020001@huawei.com> (raw)
In-Reply-To: <12d9b430-e08a-3e28-5289-028f6b395d11@suse.com>
On 2018/9/10 17:52, Juergen Gross wrote:
> 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.
>
Fine, I just consider the duplication of function. Of course. make sense you have said.
Maybe it will more clear to have the judgement.
Thanks,
zhong jiang
> Juergen
>
>
prev parent reply other threads:[~2018-09-10 13:53 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
2018-09-10 13:52 ` zhong jiang [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=5B967735.1020001@huawei.com \
--to=zhongjiang@huawei.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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