|
|
| |
int bt_sock_register(int proto, struct net_proto_family *ops) | int bt_sock_register(int proto, struct net_proto_family *ops) |
{ | { |
if (proto >= BT_MAX_PROTO) |
if (proto < 0 || proto >= BT_MAX_PROTO) |
return -EINVAL; | return -EINVAL; |
| |
if (bt_proto[proto]) | if (bt_proto[proto]) |
|
|
| |
int bt_sock_unregister(int proto) | int bt_sock_unregister(int proto) |
{ | { |
if (proto >= BT_MAX_PROTO) |
if (proto < 0 || proto >= BT_MAX_PROTO) |
return -EINVAL; | return -EINVAL; |
| |
if (!bt_proto[proto]) | if (!bt_proto[proto]) |
|
|
{ | { |
int err = 0; | int err = 0; |
| |
if (proto >= BT_MAX_PROTO) |
if (proto < 0 || proto >= BT_MAX_PROTO) |
return -EINVAL; | return -EINVAL; |
| |
#if defined(CONFIG_KMOD) | #if defined(CONFIG_KMOD) |