aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2012-04-12 11:03:21 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:40:33 -0400
commit0c01bc486a6f5f397732f808ecbcd63665c605d8 (patch)
tree8f77a612865c251c24d00ce7ada93f0f3e11950d
parent5c94f379c11a7ecfdb7c0cadbb3bb5f749e20732 (diff)
Bluetooth: mgmt: Remove unwanted goto statements
Remove goto statements that do nothing else than jump to the next line of code. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r--net/bluetooth/mgmt.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 5e80c6db6ae7..b50e2ee2595c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1247,10 +1247,8 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
1247 1247
1248 err = hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(hci_cp), 1248 err = hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(hci_cp),
1249 &hci_cp); 1249 &hci_cp);
1250 if (err < 0) { 1250 if (err < 0)
1251 mgmt_pending_remove(cmd); 1251 mgmt_pending_remove(cmd);
1252 goto unlock;
1253 }
1254 1252
1255unlock: 1253unlock:
1256 hci_dev_unlock(hdev); 1254 hci_dev_unlock(hdev);
@@ -1300,10 +1298,8 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
1300 } 1298 }
1301 1299
1302 cmd = mgmt_pending_add(sk, MGMT_OP_ADD_UUID, hdev, data, len); 1300 cmd = mgmt_pending_add(sk, MGMT_OP_ADD_UUID, hdev, data, len);
1303 if (!cmd) { 1301 if (!cmd)
1304 err = -ENOMEM; 1302 err = -ENOMEM;
1305 goto failed;
1306 }
1307 1303
1308failed: 1304failed:
1309 hci_dev_unlock(hdev); 1305 hci_dev_unlock(hdev);
@@ -1388,10 +1384,8 @@ update_class:
1388 } 1384 }
1389 1385
1390 cmd = mgmt_pending_add(sk, MGMT_OP_REMOVE_UUID, hdev, data, len); 1386 cmd = mgmt_pending_add(sk, MGMT_OP_REMOVE_UUID, hdev, data, len);
1391 if (!cmd) { 1387 if (!cmd)
1392 err = -ENOMEM; 1388 err = -ENOMEM;
1393 goto unlock;
1394 }
1395 1389
1396unlock: 1390unlock:
1397 hci_dev_unlock(hdev); 1391 hci_dev_unlock(hdev);
@@ -1442,10 +1436,8 @@ static int set_dev_class(struct sock *sk, struct hci_dev *hdev, void *data,
1442 } 1436 }
1443 1437
1444 cmd = mgmt_pending_add(sk, MGMT_OP_SET_DEV_CLASS, hdev, data, len); 1438 cmd = mgmt_pending_add(sk, MGMT_OP_SET_DEV_CLASS, hdev, data, len);
1445 if (!cmd) { 1439 if (!cmd)
1446 err = -ENOMEM; 1440 err = -ENOMEM;
1447 goto unlock;
1448 }
1449 1441
1450unlock: 1442unlock:
1451 hci_dev_unlock(hdev); 1443 hci_dev_unlock(hdev);