Skip to content

Commit 8cf5093

Browse files
jerome-pouillergregkh
authored andcommitted
staging: wfx: drop useless loop
It is guarantee that the loop will stop at first iteration. So drop the loop. Fixes: 6bf418c ("staging: wfx: change the way to choose frame to send") Signed-off-by: Jérôme Pouiller <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6a96205 commit 8cf5093

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

drivers/staging/wfx/queue.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,12 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
291291

292292
if (atomic_read(&wdev->tx_lock))
293293
return NULL;
294-
295-
for (;;) {
296-
skb = wfx_tx_queues_get_skb(wdev);
297-
if (!skb)
298-
return NULL;
299-
skb_queue_tail(&wdev->tx_pending, skb);
300-
wake_up(&wdev->tx_dequeue);
301-
tx_priv = wfx_skb_tx_priv(skb);
302-
tx_priv->xmit_timestamp = ktime_get();
303-
return (struct hif_msg *)skb->data;
304-
}
294+
skb = wfx_tx_queues_get_skb(wdev);
295+
if (!skb)
296+
return NULL;
297+
skb_queue_tail(&wdev->tx_pending, skb);
298+
wake_up(&wdev->tx_dequeue);
299+
tx_priv = wfx_skb_tx_priv(skb);
300+
tx_priv->xmit_timestamp = ktime_get();
301+
return (struct hif_msg *)skb->data;
305302
}

0 commit comments

Comments
 (0)