* [PATCH] staging: rtl8712: remove unnecessary NULL check
@ 2019-04-03 16:08 Himadri Pandya
2019-04-05 13:52 ` Himadri Pandya
0 siblings, 1 reply; 3+ messages in thread
From: Himadri Pandya @ 2019-04-03 16:08 UTC (permalink / raw)
To: Larry.Finger, florian.c.schilhabel, gregkh
Cc: outreachy-kernel, Himadri Pandya
List wlan_network is built properly with init_list_head and
list_add_tail which cancels out its probability of being NULL because of
the precence of list_head at the top of this structure. Hence, the NULL
test can be omitted.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
---
drivers/staging/rtl8712/rtl871x_mlme.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index e370841a79ca..7c7267d0fc9e 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -1120,8 +1120,6 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv)
}
pnetwork = container_of(pmlmepriv->pscanned,
struct wlan_network, list);
- if (!pnetwork)
- return _FAIL;
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
if (pmlmepriv->assoc_by_bssid) {
dst_ssid = pnetwork->network.MacAddress;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: rtl8712: remove unnecessary NULL check
2019-04-03 16:08 [PATCH] staging: rtl8712: remove unnecessary NULL check Himadri Pandya
@ 2019-04-05 13:52 ` Himadri Pandya
2019-04-16 11:28 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Himadri Pandya @ 2019-04-05 13:52 UTC (permalink / raw)
To: Larry Finger, Florian Schilhabel, gregkh; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
On Wed, 3 Apr, 2019, 9:38 PM Himadri Pandya, <himadri18.07@gmail.com> wrote:
> List wlan_network is built properly with init_list_head and
> list_add_tail which cancels out its probability of being NULL because of
> the precence of list_head at the top of this structure. Hence, the NULL
> test can be omitted.
>
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
> drivers/staging/rtl8712/rtl871x_mlme.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c
> b/drivers/staging/rtl8712/rtl871x_mlme.c
> index e370841a79ca..7c7267d0fc9e 100644
> --- a/drivers/staging/rtl8712/rtl871x_mlme.c
> +++ b/drivers/staging/rtl8712/rtl871x_mlme.c
> @@ -1120,8 +1120,6 @@ int r8712_select_and_join_from_scan(struct mlme_priv
> *pmlmepriv)
> }
> pnetwork = container_of(pmlmepriv->pscanned,
> struct wlan_network, list);
> - if (!pnetwork)
> - return _FAIL;
> pmlmepriv->pscanned = pmlmepriv->pscanned->next;
> if (pmlmepriv->assoc_by_bssid) {
> dst_ssid = pnetwork->network.MacAddress;
> --
> 2.17.1
>
Please let me know if the patch needs any further improvements.
Thank you.
- Himadri
>
[-- Attachment #2: Type: text/html, Size: 2387 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: rtl8712: remove unnecessary NULL check
2019-04-05 13:52 ` Himadri Pandya
@ 2019-04-16 11:28 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-04-16 11:28 UTC (permalink / raw)
To: Himadri Pandya; +Cc: Larry Finger, Florian Schilhabel, outreachy-kernel
On Fri, Apr 05, 2019 at 07:22:58PM +0530, Himadri Pandya wrote:
> On Wed, 3 Apr, 2019, 9:38 PM Himadri Pandya, <himadri18.07@gmail.com> wrote:
>
> > List wlan_network is built properly with init_list_head and
> > list_add_tail which cancels out its probability of being NULL because of
> > the precence of list_head at the top of this structure. Hence, the NULL
> > test can be omitted.
> >
> > Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> > ---
> > drivers/staging/rtl8712/rtl871x_mlme.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c
> > b/drivers/staging/rtl8712/rtl871x_mlme.c
> > index e370841a79ca..7c7267d0fc9e 100644
> > --- a/drivers/staging/rtl8712/rtl871x_mlme.c
> > +++ b/drivers/staging/rtl8712/rtl871x_mlme.c
> > @@ -1120,8 +1120,6 @@ int r8712_select_and_join_from_scan(struct mlme_priv
> > *pmlmepriv)
> > }
> > pnetwork = container_of(pmlmepriv->pscanned,
> > struct wlan_network, list);
> > - if (!pnetwork)
> > - return _FAIL;
> > pmlmepriv->pscanned = pmlmepriv->pscanned->next;
> > if (pmlmepriv->assoc_by_bssid) {
> > dst_ssid = pnetwork->network.MacAddress;
> > --
> > 2.17.1
> >
>
> Please let me know if the patch needs any further improvements.
Please be patient, wait at least 2 weeks for people to get around to
reviewing changes as trivial as code cleanup stuff is.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-16 11:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 16:08 [PATCH] staging: rtl8712: remove unnecessary NULL check Himadri Pandya
2019-04-05 13:52 ` Himadri Pandya
2019-04-16 11:28 ` Greg KH
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.