kernel: allow __netdev_alloc_skb_ip_align to be called with dev = NULL
[openwrt.git] / target / linux / generic / patches-3.8 / 721-phy_packets.patch
index d78ba8e..88b5969 100644 (file)
 +      struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
 +
 +#ifdef CONFIG_ETHERNET_PACKET_MANGLE
-+      if (dev->priv_flags & IFF_NO_IP_ALIGN)
++      if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
 +              return skb;
 +#endif
 +