summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-08-07 23:42:03 -0700
committerDavid S. Miller <davem@davemloft.net>2018-09-10 10:06:53 -0700
commite3554197fc8fbb9656f62c18f9c9edd396394e16 (patch)
tree36b8b4facd68b6f133fb1da5dcac9a3f199b2a1c
parent1181d629cc135fe346216c66f0f1fb9bfca51b33 (diff)
p54: Use skb_peek_tail() instead of direct head pointer accesses.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wireless/intersil/p54/txrx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/intersil/p54/txrx.c b/drivers/net/wireless/intersil/p54/txrx.c
index 3a4214d362ff..790784568ad2 100644
--- a/drivers/net/wireless/intersil/p54/txrx.c
+++ b/drivers/net/wireless/intersil/p54/txrx.c
@@ -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;