From: Dan Carpenter <dan.carpenter@oracle.com>
To: Colin King <colin.king@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
John Whitmore <johnfwhitmore@gmail.com>,
devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: remove redundant null check on array 'data'
Date: Thu, 4 Apr 2019 12:41:41 +0300 [thread overview]
Message-ID: <20190404094141.GJ32590@kadam> (raw)
In-Reply-To: <20190404093257.18757-1-colin.king@canonical.com>
On Thu, Apr 04, 2019 at 10:32:57AM +0100, Colin King wrote:
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> index 944c8894f9ff..c4a4f118f547 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> @@ -2659,8 +2659,7 @@ static int ieee80211_wpa_set_wpa_ie(struct ieee80211_device *ieee,
> {
> u8 *buf;
>
> - if (param->u.wpa_ie.len > MAX_WPA_IE_LEN ||
> - (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL))
> + if (param->u.wpa_ie.len > MAX_WPA_IE_LEN || param->u.wpa_ie.len)
> return -EINVAL;
Nope... :P Don't do that...
regards,
dan carpenter
next prev parent reply other threads:[~2019-04-04 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 9:32 [PATCH] staging: rtl8192u: remove redundant null check on array 'data' Colin King
2019-04-04 9:41 ` Dan Carpenter [this message]
2019-04-04 10:16 ` Mukesh Ojha
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=20190404094141.GJ32590@kadam \
--to=dan.carpenter@oracle.com \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johnfwhitmore@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox