Commit 95d2a324 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

staging: ks7010: don't print skb->dev->name if skb is null

A null pointer dereference will occur when skb is null and
skb->dev->name is printed.  Replace the skb->dev->name with
plain text "ks_wlan" to fix this.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9afe11e9
...@@ -485,8 +485,7 @@ void hostif_data_indication(struct ks_wlan_private *priv) ...@@ -485,8 +485,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
netif_rx(skb); netif_rx(skb);
} else { } else {
printk(KERN_WARNING printk(KERN_WARNING
"%s: Memory squeeze, dropping packet.\n", "ks_wlan: Memory squeeze, dropping packet.\n");
skb->dev->name);
priv->nstats.rx_dropped++; priv->nstats.rx_dropped++;
} }
break; break;
...@@ -521,8 +520,7 @@ void hostif_data_indication(struct ks_wlan_private *priv) ...@@ -521,8 +520,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
netif_rx(skb); netif_rx(skb);
} else { } else {
printk(KERN_WARNING printk(KERN_WARNING
"%s: Memory squeeze, dropping packet.\n", "ks_wlan: Memory squeeze, dropping packet.\n");
skb->dev->name);
priv->nstats.rx_dropped++; priv->nstats.rx_dropped++;
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment