From: zhong jiang <zhongjiang@huawei.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <davem@davemloft.net>, <linux-wireless@vger.kernel.org>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] wireless: remove unnecessary condition check before kfree
Date: Mon, 10 Sep 2018 21:54:36 +0800 [thread overview]
Message-ID: <5B96779C.5060306@huawei.com> (raw)
In-Reply-To: <1536563406.3224.2.camel@sipsolutions.net>
On 2018/9/10 15:10, Johannes Berg wrote:
> On Sat, 2018-09-08 at 22:12 +0800, zhong jiang wrote:
>> kfree has taken the null pointer into account. Just remove the
>> redundant condition check before kfree.
> I'm all for doing that if it actually removes conditionals, but
>
>> - if (!IS_ERR_OR_NULL(regdb))
>> + if (!IS_ERR(regdb))
>> kfree(regdb);
> this seems rather pointless since there's still a condition. In that
> case, I feel it's easier to understand the original code.
Fine, make sense you have said. I just consider the duplication of function.
Thanks,
zhong jiang
> johannes
>
> .
>
prev parent reply other threads:[~2018-09-10 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-08 14:12 [PATCH] wireless: remove unnecessary condition check before kfree zhong jiang
2018-09-10 7:10 ` Johannes Berg
2018-09-10 13:54 ` 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=5B96779C.5060306@huawei.com \
--to=zhongjiang@huawei.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.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 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.