Bluetooth: fix errors reported by checkpatch.pl

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
Gustavo F. Padovan
2011-02-17 19:16:55 -03:00
parent 138d22ef14
commit e2174ca430
2 changed files with 18 additions and 22 deletions

View File

@@ -1127,30 +1127,30 @@ static const struct net_proto_family l2cap_sock_family_ops = {
int __init l2cap_init_sockets(void)
{
int err;
int err;
err = proto_register(&l2cap_proto, 0);
if (err < 0)
return err;
err = proto_register(&l2cap_proto, 0);
if (err < 0)
return err;
err = bt_sock_register(BTPROTO_L2CAP, &l2cap_sock_family_ops);
if (err < 0)
goto error;
err = bt_sock_register(BTPROTO_L2CAP, &l2cap_sock_family_ops);
if (err < 0)
goto error;
BT_INFO("L2CAP socket layer initialized");
BT_INFO("L2CAP socket layer initialized");
return 0;
return 0;
error:
BT_ERR("L2CAP socket registration failed");
proto_unregister(&l2cap_proto);
return err;
BT_ERR("L2CAP socket registration failed");
proto_unregister(&l2cap_proto);
return err;
}
void l2cap_cleanup_sockets(void)
{
if (bt_sock_unregister(BTPROTO_L2CAP) < 0)
BT_ERR("L2CAP socket unregistration failed");
if (bt_sock_unregister(BTPROTO_L2CAP) < 0)
BT_ERR("L2CAP socket unregistration failed");
proto_unregister(&l2cap_proto);
proto_unregister(&l2cap_proto);
}