From: Martin Kaiser Date: Mon, 23 Jan 2023 20:53:29 +0000 (+0100) Subject: staging: r8188eu: use list_empty X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d5986148e802d1704720202b1e1c94d69c936ebd;p=linux.git staging: r8188eu: use list_empty Use list_empty to check for an empty list instead of coding the check manually. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 943e7a56f7ce7..334d752140116 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1363,7 +1363,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct tx_servq *ptxservq, struc xmitframe_phead = get_list_head(pframe_queue); xmitframe_plist = xmitframe_phead->next; - if (xmitframe_phead != xmitframe_plist) { + if (!list_empty(xmitframe_phead)) { pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list); list_del_init(&pxmitframe->list); ptxservq->qcnt--;