From: Cihangir Akturk <cakturk@gmail.com>
To: Larry.Finger@lwfinger.net, Jes.Sorensen@redhat.com
Cc: gregkh@linuxfoundation.org, linux-wireless@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: Re: drivers: staging: rtl8723au: remove unneeded null test
Date: Fri, 4 Mar 2016 15:41:42 +0200 [thread overview]
Message-ID: <20160304134142.GA7697@portege.ulakbim.gov.tr> (raw)
In-Reply-To: <1457096899-7421-1-git-send-email-cakturk@gmail.com>
On Fri, Mar 04, 2016 at 03:08:19PM +0200, Cihangir Akturk wrote:
> null test on pnetwork removed, because the iterator variable
> list_for_each_entry_safe cannot be null.
>
> This commit fixes the following error reported by coccinelle:
>
> drivers/staging/rtl8723au/core/rtw_mlme.c:1621:7-15: ERROR: iterator
> variable bound on line 1620 cannot be NULL
>
> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
> ---
> drivers/staging/rtl8723au/core/rtw_mlme.c | 13 ++-----------
> 1 file changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
> index 3adda55..a786fc4 100644
> --- a/drivers/staging/rtl8723au/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
> @@ -1617,19 +1617,10 @@ rtw_select_candidate_from_queue(struct mlme_priv *pmlmepriv)
>
> spin_lock_bh(&pmlmepriv->scanned_queue.lock);
> phead = get_list_head(queue);
> - list_for_each_entry_safe(pnetwork, ptmp, phead, list) {
> - if (!pnetwork) {
> - RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
> - "%s: return _FAIL:(pnetwork == NULL)\n",
> - __func__);
> - goto exit;
> - }
> -
> + list_for_each_entry_safe(pnetwork, ptmp, phead, list)
> rtw_check_join_candidate(pmlmepriv, &candidate, pnetwork);
> - }
> -
> -exit:
> spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
> +
> return candidate;
> }
>
> --
> 2.1.4
>
Opps. It seems I've made a mistake by not adding PATCH suffix. Please
ignore this patch, I will resend it in correct format.
Sorry for the noise.
prev parent reply other threads:[~2016-03-04 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 13:08 drivers: staging: rtl8723au: remove unneeded null test Cihangir Akturk
2016-03-04 13:41 ` Cihangir Akturk [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=20160304134142.GA7697@portege.ulakbim.gov.tr \
--to=cakturk@gmail.com \
--cc=Jes.Sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-wireless@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