diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-18 11:02:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-18 11:02:26 -0700 |
commit | b0e7031ac08fa0aa242531c8d9a0cf9ae8ee276d (patch) | |
tree | 86ae983c51b9df07ead6f00aeddbf276f672c839 /net/caif | |
parent | 01a7143586f51f80e1b29ebf240c6e5390657450 (diff) | |
parent | 8e2ec639173f325977818c45011ee176ef2b11f6 (diff) | |
download | linux-3.10-b0e7031ac08fa0aa242531c8d9a0cf9ae8ee276d.tar.gz linux-3.10-b0e7031ac08fa0aa242531c8d9a0cf9ae8ee276d.tar.bz2 linux-3.10-b0e7031ac08fa0aa242531c8d9a0cf9ae8ee276d.zip |
Merge git://github.com/davem330/net
* git://github.com/davem330/net: (62 commits)
ipv6: don't use inetpeer to store metrics for routes.
can: ti_hecc: include linux/io.h
IRDA: Fix global type conflicts in net/irda/irsysctl.c v2
net: Handle different key sizes between address families in flow cache
net: Align AF-specific flowi structs to long
ipv4: Fix fib_info->fib_metrics leak
caif: fix a potential NULL dereference
sctp: deal with multiple COOKIE_ECHO chunks
ibmveth: Fix checksum offload failure handling
ibmveth: Checksum offload is always disabled
ibmveth: Fix issue with DMA mapping failure
ibmveth: Fix DMA unmap error
pch_gbe: support ML7831 IOH
pch_gbe: added the process of FIFO over run error
pch_gbe: fixed the issue which receives an unnecessary packet.
sfc: Use 64-bit writes for TX push where possible
Revert "sfc: Use write-combining to reduce TX latency" and follow-ups
bnx2x: Fix ethtool advertisement
bnx2x: Fix 578xx link LED
bnx2x: Fix XMAC loopback test
...
Diffstat (limited to 'net/caif')
-rw-r--r-- | net/caif/caif_dev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 7c2fa0a0814..7f9ac0742d1 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -93,10 +93,14 @@ static struct caif_device_entry *caif_device_alloc(struct net_device *dev) caifdevs = caif_device_list(dev_net(dev)); BUG_ON(!caifdevs); - caifd = kzalloc(sizeof(*caifd), GFP_ATOMIC); + caifd = kzalloc(sizeof(*caifd), GFP_KERNEL); if (!caifd) return NULL; caifd->pcpu_refcnt = alloc_percpu(int); + if (!caifd->pcpu_refcnt) { + kfree(caifd); + return NULL; + } caifd->netdev = dev; dev_hold(dev); return caifd; |