Skip to content

Commit

Permalink
Bluetooth: Coding style cleanup from previous rfcomm_init bug fix
Browse files Browse the repository at this point in the history
The rfcomm_init bug fix went into the kernel premature before it got fully
reviewed and acknowledged by the Bluetooth maintainer. So fix up the coding
style now.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Marcel Holtmann committed Aug 22, 2009
1 parent a6a67ef commit 52d1834
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions net/bluetooth/rfcomm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,41 +2080,43 @@ static CLASS_ATTR(rfcomm_dlc, S_IRUGO, rfcomm_dlc_sysfs_show, NULL);
/* ---- Initialization ---- */
static int __init rfcomm_init(void)
{
int ret;
int err;

l2cap_load();

hci_register_cb(&rfcomm_cb);

rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd");
if (IS_ERR(rfcomm_thread)) {
ret = PTR_ERR(rfcomm_thread);
goto out_thread;
err = PTR_ERR(rfcomm_thread);
goto unregister;
}

if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0)
BT_ERR("Failed to create RFCOMM info file");

ret = rfcomm_init_ttys();
if (ret)
goto out_tty;
err = rfcomm_init_ttys();
if (err < 0)
goto stop;

ret = rfcomm_init_sockets();
if (ret)
goto out_sock;
err = rfcomm_init_sockets();
if (err < 0)
goto cleanup;

BT_INFO("RFCOMM ver %s", VERSION);

return 0;

out_sock:
cleanup:
rfcomm_cleanup_ttys();
out_tty:

stop:
kthread_stop(rfcomm_thread);
out_thread:

unregister:
hci_unregister_cb(&rfcomm_cb);

return ret;
return err;
}

static void __exit rfcomm_exit(void)
Expand Down

0 comments on commit 52d1834

Please sign in to comment.