mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
9840093505
commit
da6c37392c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue