|
Lines 62-68
Link Here
|
| 62 |
|
62 |
|
| 63 |
int bt_sock_register(int proto, struct net_proto_family *ops) |
63 |
int bt_sock_register(int proto, struct net_proto_family *ops) |
| 64 |
{ |
64 |
{ |
| 65 |
if (proto >= BT_MAX_PROTO) |
65 |
if (proto < 0 || proto >= BT_MAX_PROTO) |
| 66 |
return -EINVAL; |
66 |
return -EINVAL; |
| 67 |
|
67 |
|
| 68 |
if (bt_proto[proto]) |
68 |
if (bt_proto[proto]) |
|
Lines 75-81
Link Here
|
| 75 |
|
75 |
|
| 76 |
int bt_sock_unregister(int proto) |
76 |
int bt_sock_unregister(int proto) |
| 77 |
{ |
77 |
{ |
| 78 |
if (proto >= BT_MAX_PROTO) |
78 |
if (proto < 0 || proto >= BT_MAX_PROTO) |
| 79 |
return -EINVAL; |
79 |
return -EINVAL; |
| 80 |
|
80 |
|
| 81 |
if (!bt_proto[proto]) |
81 |
if (!bt_proto[proto]) |
|
Lines 90-96
Link Here
|
| 90 |
{ |
90 |
{ |
| 91 |
int err = 0; |
91 |
int err = 0; |
| 92 |
|
92 |
|
| 93 |
if (proto >= BT_MAX_PROTO) |
93 |
if (proto < 0 || proto >= BT_MAX_PROTO) |
| 94 |
return -EINVAL; |
94 |
return -EINVAL; |
| 95 |
|
95 |
|
| 96 |
#if defined(CONFIG_KMOD) |
96 |
#if defined(CONFIG_KMOD) |