From c2a0523bb7568b1b20dcc8976f4663500d2b2285 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 6 Sep 2013 22:11:06 -0500 Subject: [PATCH] rtl8188eu: Fix smatch warning in core/rtw_xmit.c Smatch shows the following: CHECK /home/finger/rtl8188eu/core/rtw_xmit.c /home/finger/rtl8188eu/core/rtw_xmit.c:1560 dequeue_one_xmitframe() info: ignoring unreachable code. A while loop that has a break in the first pss is converted to to an if statement. Signed-off-by: Larry Finger --- core/rtw_xmit.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index abd693f..f397051 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -1557,18 +1557,12 @@ 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); - rtw_list_delete(&pxmitframe->list); - ptxservq->qcnt--; - - break; } - return pxmitframe; }