Skip to content

Commit

Permalink
p54: Use skb_peek_tail() instead of direct head pointer accesses.
Browse files Browse the repository at this point in the history
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Sep 10, 2018
1 parent 1181d62 commit e355419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/intersil/p54/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ static int p54_assign_address(struct p54_common *priv, struct sk_buff *skb)
}
if (unlikely(!target_skb)) {
if (priv->rx_end - last_addr >= len) {
target_skb = priv->tx_queue.prev;
if (!skb_queue_empty(&priv->tx_queue)) {
target_skb = skb_peek_tail(&priv->tx_queue);
if (target_skb) {
info = IEEE80211_SKB_CB(target_skb);
range = (void *)info->rate_driver_data;
target_addr = range->end_addr;
Expand Down

0 comments on commit e355419

Please sign in to comment.