aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/rfcomm
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-08-22 17:49:36 -0400
committerMarcel Holtmann <marcel@holtmann.org>2009-08-22 17:49:36 -0400
commit52d18347dfb61519aa0f58fe1759edd3ad8c4e36 (patch)
treee704210e27846a7763853d3a15236809c00e3ef4 /net/bluetooth/rfcomm
parenta6a67efd7088702fdbbb780c5a3f8e1a74e77b63 (diff)
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: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r--net/bluetooth/rfcomm/core.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 94b3388c188b..26af4854af64 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -2080,7 +2080,7 @@ static CLASS_ATTR(rfcomm_dlc, S_IRUGO, rfcomm_dlc_sysfs_show, NULL);
2080/* ---- Initialization ---- */ 2080/* ---- Initialization ---- */
2081static int __init rfcomm_init(void) 2081static int __init rfcomm_init(void)
2082{ 2082{
2083 int ret; 2083 int err;
2084 2084
2085 l2cap_load(); 2085 l2cap_load();
2086 2086
@@ -2088,33 +2088,35 @@ static int __init rfcomm_init(void)
2088 2088
2089 rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd"); 2089 rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd");
2090 if (IS_ERR(rfcomm_thread)) { 2090 if (IS_ERR(rfcomm_thread)) {
2091 ret = PTR_ERR(rfcomm_thread); 2091 err = PTR_ERR(rfcomm_thread);
2092 goto out_thread; 2092 goto unregister;
2093 } 2093 }
2094 2094
2095 if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0) 2095 if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0)
2096 BT_ERR("Failed to create RFCOMM info file"); 2096 BT_ERR("Failed to create RFCOMM info file");
2097 2097
2098 ret = rfcomm_init_ttys(); 2098 err = rfcomm_init_ttys();
2099 if (ret) 2099 if (err < 0)
2100 goto out_tty; 2100 goto stop;
2101 2101
2102 ret = rfcomm_init_sockets(); 2102 err = rfcomm_init_sockets();
2103 if (ret) 2103 if (err < 0)
2104 goto out_sock; 2104 goto cleanup;
2105 2105
2106 BT_INFO("RFCOMM ver %s", VERSION); 2106 BT_INFO("RFCOMM ver %s", VERSION);
2107 2107
2108 return 0; 2108 return 0;
2109 2109
2110out_sock: 2110cleanup:
2111 rfcomm_cleanup_ttys(); 2111 rfcomm_cleanup_ttys();
2112out_tty: 2112
2113stop:
2113 kthread_stop(rfcomm_thread); 2114 kthread_stop(rfcomm_thread);
2114out_thread: 2115
2116unregister:
2115 hci_unregister_cb(&rfcomm_cb); 2117 hci_unregister_cb(&rfcomm_cb);
2116 2118
2117 return ret; 2119 return err;
2118} 2120}
2119 2121
2120static void __exit rfcomm_exit(void) 2122static void __exit rfcomm_exit(void)