Commit 52d18347 authored by Marcel Holtmann's avatar Marcel Holtmann

Bluetooth: Coding style cleanup from previous rfcomm_init bug fix

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: default avatarMarcel Holtmann <marcel@holtmann.org>
parent a6a67efd
...@@ -2080,7 +2080,7 @@ static CLASS_ATTR(rfcomm_dlc, S_IRUGO, rfcomm_dlc_sysfs_show, NULL); ...@@ -2080,7 +2080,7 @@ static CLASS_ATTR(rfcomm_dlc, S_IRUGO, rfcomm_dlc_sysfs_show, NULL);
/* ---- Initialization ---- */ /* ---- Initialization ---- */
static int __init rfcomm_init(void) static int __init rfcomm_init(void)
{ {
int ret; int err;
l2cap_load(); l2cap_load();
...@@ -2088,33 +2088,35 @@ static int __init rfcomm_init(void) ...@@ -2088,33 +2088,35 @@ static int __init rfcomm_init(void)
rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd"); rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd");
if (IS_ERR(rfcomm_thread)) { if (IS_ERR(rfcomm_thread)) {
ret = PTR_ERR(rfcomm_thread); err = PTR_ERR(rfcomm_thread);
goto out_thread; goto unregister;
} }
if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0) if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0)
BT_ERR("Failed to create RFCOMM info file"); BT_ERR("Failed to create RFCOMM info file");
ret = rfcomm_init_ttys(); err = rfcomm_init_ttys();
if (ret) if (err < 0)
goto out_tty; goto stop;
ret = rfcomm_init_sockets(); err = rfcomm_init_sockets();
if (ret) if (err < 0)
goto out_sock; goto cleanup;
BT_INFO("RFCOMM ver %s", VERSION); BT_INFO("RFCOMM ver %s", VERSION);
return 0; return 0;
out_sock: cleanup:
rfcomm_cleanup_ttys(); rfcomm_cleanup_ttys();
out_tty:
stop:
kthread_stop(rfcomm_thread); kthread_stop(rfcomm_thread);
out_thread:
unregister:
hci_unregister_cb(&rfcomm_cb); hci_unregister_cb(&rfcomm_cb);
return ret; return err;
} }
static void __exit rfcomm_exit(void) static void __exit rfcomm_exit(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment