Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183776
b: refs/heads/master
c: 8b64056
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Hartkopp authored and David S. Miller committed Feb 2, 2010
1 parent 754a1f4 commit 32cb787
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44298ec0f20c45b9be96e181976aef1152d373b2
refs/heads/master: 8b64056dacf6ec81986d63dff96fca039fe95f6e
6 changes: 6 additions & 0 deletions trunk/net/can/af_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ int can_rx_register(struct net_device *dev, canid_t can_id, canid_t mask,

/* insert new receiver (dev,canid,mask) -> (func,data) */

if (dev && dev->type != ARPHRD_CAN)
return -ENODEV;

r = kmem_cache_alloc(rcv_cache, GFP_KERNEL);
if (!r)
return -ENOMEM;
Expand Down Expand Up @@ -478,6 +481,9 @@ void can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
struct hlist_node *next;
struct dev_rcv_lists *d;

if (dev && dev->type != ARPHRD_CAN)
return;

spin_lock(&can_rcvlists_lock);

d = find_dev_rcv_lists(dev);
Expand Down

0 comments on commit 32cb787

Please sign in to comment.