[kernel] add two solos-releated patches from Philip Prindeville
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-2.6.35 / 280-solos_dont_null_deref.patch
1 --- a/drivers/atm/solos-pci.c
2 +++ b/drivers/atm/solos-pci.c
3 @@ -864,8 +864,9 @@ static int popen(struct atm_vcc *vcc)
4 }
5
6 skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
7 - if (!skb && net_ratelimit()) {
8 - dev_warn(&card->dev->dev, "Failed to allocate sk_buff in popen()\n");
9 + if (!skb) {
10 + if (net_ratelimit())
11 + dev_warn(&card->dev->dev, "Failed to allocate sk_buff in popen()\n");
12 return -ENOMEM;
13 }
14 header = (void *)skb_put(skb, sizeof(*header));