summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-09-04 20:56:11 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-17 14:47:45 (GMT)
commitda6c37392c92efdda7b887c7e85a33324e7e5eda (patch)
tree0a981b1565633c27f9074b2119cb862517a44740 /drivers/staging
parent9840093505bffa3f153bda2ac4046b868486150d (diff)
downloadlinux-fsl-qoriq-da6c37392c92efdda7b887c7e85a33324e7e5eda.tar.xz
staging: r8188eu: Fix smatch warning in rtl8188eu/core/rtw_xmit.c
Smatch reports the following: CHECK drivers/staging/rtl8188eu/core/rtw_xmit.c drivers/staging/rtl8188eu/core/rtw_xmit.c:1570 dequeue_one_xmitframe() info: ignoring unreachable code. This code uses a while construction that has an unconditional break. This part of the code was restructured to use an if statement and the dead code was removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_xmit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index bb5cd95..a594e51 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -1556,7 +1556,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
xmitframe_phead = get_list_head(pframe_queue);
xmitframe_plist = get_next(xmitframe_phead);
- while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
+ if (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist);
@@ -1564,12 +1564,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
rtw_list_delete(&pxmitframe->list);
ptxservq->qcnt--;
-
- break;
-
- pxmitframe = NULL;
}
-
return pxmitframe;
}