lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1403434912-21655-1-git-send-email-thomas@grouk.net> Date: Sun, 22 Jun 2014 13:01:50 +0200 From: Thomas Vegas <thomas@...uk.net> To: gregkh@...uxfoundation.org Cc: Thomas Vegas <thomas@...uk.net>, Larry.Finger@...inger.net, navin.patidar@...il.com, devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org Subject: [PATCH 1/3] staging: rtl8188eu: core: Remove unnecessary conditionals The variable 'pxmitbuf' is already set to NULL when entering the function. We can remove the first conditional. When _rtw_queue_empty() returns false, 'pxmitbuf' if not NULL. We can merge the second and third conditional. Signed-off-by: Thomas Vegas <thomas@...uk.net> --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index a113f0f..bb290a3 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -1226,9 +1226,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv) spin_lock_irqsave(&pfree_queue->lock, irql); - if (_rtw_queue_empty(pfree_queue) == true) { - pxmitbuf = NULL; - } else { + if (_rtw_queue_empty(pfree_queue) == false) { phead = get_list_head(pfree_queue); plist = phead->next; @@ -1236,9 +1234,6 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv) pxmitbuf = container_of(plist, struct xmit_buf, list); rtw_list_delete(&(pxmitbuf->list)); - } - - if (pxmitbuf != NULL) { pxmitpriv->free_xmit_extbuf_cnt--; pxmitbuf->priv_data = NULL; -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists