diff options
author | Dan Murphy <dmurphy@ti.com> | 2012-02-06 07:35:27 -0600 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2012-02-06 07:35:27 -0600 |
commit | 2a76988fc34a56d436a15a9a002c4c6194082160 (patch) | |
tree | 748b51b738610e2b1d1612b2ae5ee0a392e0d0f5 /net/caif | |
parent | 763ba8fb042967ab99f003955c269c2484610894 (diff) | |
parent | 5d14e472c60de8791259a0dbb8ba5252d0862a63 (diff) | |
download | kernel_samsung_espresso10-2a76988fc34a56d436a15a9a002c4c6194082160.tar.gz kernel_samsung_espresso10-2a76988fc34a56d436a15a9a002c4c6194082160.tar.bz2 kernel_samsung_espresso10-2a76988fc34a56d436a15a9a002c4c6194082160.zip |
Merge branch 'linux-3.0.19' into p-android-omap-3.0
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Diffstat (limited to 'net/caif')
-rw-r--r-- | net/caif/caif_dev.c | 11 | ||||
-rw-r--r-- | net/caif/cfcnfg.c | 1 |
2 files changed, 4 insertions, 8 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index dbdaa95b800..5ba4366a220 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -53,7 +53,6 @@ struct cfcnfg *get_cfcnfg(struct net *net) struct caif_net *caifn; BUG_ON(!net); caifn = net_generic(net, caif_net_id); - BUG_ON(!caifn); return caifn->cfg; } EXPORT_SYMBOL(get_cfcnfg); @@ -63,7 +62,6 @@ static struct caif_device_entry_list *caif_device_list(struct net *net) struct caif_net *caifn; BUG_ON(!net); caifn = net_generic(net, caif_net_id); - BUG_ON(!caifn); return &caifn->caifdevs; } @@ -92,7 +90,6 @@ static struct caif_device_entry *caif_device_alloc(struct net_device *dev) struct caif_device_entry *caifd; caifdevs = caif_device_list(dev_net(dev)); - BUG_ON(!caifdevs); caifd = kzalloc(sizeof(*caifd), GFP_ATOMIC); if (!caifd) @@ -108,7 +105,7 @@ static struct caif_device_entry *caif_get(struct net_device *dev) struct caif_device_entry_list *caifdevs = caif_device_list(dev_net(dev)); struct caif_device_entry *caifd; - BUG_ON(!caifdevs); + list_for_each_entry_rcu(caifd, &caifdevs->list, list) { if (caifd->netdev == dev) return caifd; @@ -349,7 +346,7 @@ static struct notifier_block caif_device_notifier = { static int caif_init_net(struct net *net) { struct caif_net *caifn = net_generic(net, caif_net_id); - BUG_ON(!caifn); + INIT_LIST_HEAD(&caifn->caifdevs.list); mutex_init(&caifn->caifdevs.lock); @@ -414,7 +411,7 @@ static int __init caif_device_init(void) { int result; - result = register_pernet_device(&caif_net_ops); + result = register_pernet_subsys(&caif_net_ops); if (result) return result; @@ -427,7 +424,7 @@ static int __init caif_device_init(void) static void __exit caif_device_exit(void) { - unregister_pernet_device(&caif_net_ops); + unregister_pernet_subsys(&caif_net_ops); unregister_netdevice_notifier(&caif_device_notifier); dev_remove_pack(&caif_packet_type); } diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c index 52fe33bee02..bca32d7c15c 100644 --- a/net/caif/cfcnfg.c +++ b/net/caif/cfcnfg.c @@ -313,7 +313,6 @@ int caif_connect_client(struct net *net, struct caif_connect_request *conn_req, int err; struct cfctrl_link_param param; struct cfcnfg *cfg = get_cfcnfg(net); - caif_assert(cfg != NULL); rcu_read_lock(); err = caif_connect_req_to_link_param(cfg, conn_req, ¶m); |