diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2012-12-13 09:11:21 -0500 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-01-09 14:05:06 -0500 |
commit | a6785be2f76e2c39b3008820e7bfef8f5fd838bc (patch) | |
tree | c54d1a2c298825ee1c73d0528291b4ace55ba5d6 /net/bluetooth | |
parent | 47c37941b8895557409db286e6a441e6d557d62f (diff) |
Bluetooth: mgmt: Avoid using magic number in status code
Use MGMT_STATUS_SUCCESS for success return code.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index ef385824a144..e5502a56365b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -2259,7 +2259,7 @@ static int add_remote_oob_data(struct sock *sk, struct hci_dev *hdev, | |||
2259 | if (err < 0) | 2259 | if (err < 0) |
2260 | status = MGMT_STATUS_FAILED; | 2260 | status = MGMT_STATUS_FAILED; |
2261 | else | 2261 | else |
2262 | status = 0; | 2262 | status = MGMT_STATUS_SUCCESS; |
2263 | 2263 | ||
2264 | err = cmd_complete(sk, hdev->id, MGMT_OP_ADD_REMOTE_OOB_DATA, status, | 2264 | err = cmd_complete(sk, hdev->id, MGMT_OP_ADD_REMOTE_OOB_DATA, status, |
2265 | &cp->addr, sizeof(cp->addr)); | 2265 | &cp->addr, sizeof(cp->addr)); |
@@ -2283,7 +2283,7 @@ static int remove_remote_oob_data(struct sock *sk, struct hci_dev *hdev, | |||
2283 | if (err < 0) | 2283 | if (err < 0) |
2284 | status = MGMT_STATUS_INVALID_PARAMS; | 2284 | status = MGMT_STATUS_INVALID_PARAMS; |
2285 | else | 2285 | else |
2286 | status = 0; | 2286 | status = MGMT_STATUS_SUCCESS; |
2287 | 2287 | ||
2288 | err = cmd_complete(sk, hdev->id, MGMT_OP_REMOVE_REMOTE_OOB_DATA, | 2288 | err = cmd_complete(sk, hdev->id, MGMT_OP_REMOVE_REMOTE_OOB_DATA, |
2289 | status, &cp->addr, sizeof(cp->addr)); | 2289 | status, &cp->addr, sizeof(cp->addr)); |
@@ -2515,7 +2515,7 @@ static int block_device(struct sock *sk, struct hci_dev *hdev, void *data, | |||
2515 | if (err < 0) | 2515 | if (err < 0) |
2516 | status = MGMT_STATUS_FAILED; | 2516 | status = MGMT_STATUS_FAILED; |
2517 | else | 2517 | else |
2518 | status = 0; | 2518 | status = MGMT_STATUS_SUCCESS; |
2519 | 2519 | ||
2520 | err = cmd_complete(sk, hdev->id, MGMT_OP_BLOCK_DEVICE, status, | 2520 | err = cmd_complete(sk, hdev->id, MGMT_OP_BLOCK_DEVICE, status, |
2521 | &cp->addr, sizeof(cp->addr)); | 2521 | &cp->addr, sizeof(cp->addr)); |
@@ -2540,7 +2540,7 @@ static int unblock_device(struct sock *sk, struct hci_dev *hdev, void *data, | |||
2540 | if (err < 0) | 2540 | if (err < 0) |
2541 | status = MGMT_STATUS_INVALID_PARAMS; | 2541 | status = MGMT_STATUS_INVALID_PARAMS; |
2542 | else | 2542 | else |
2543 | status = 0; | 2543 | status = MGMT_STATUS_SUCCESS; |
2544 | 2544 | ||
2545 | err = cmd_complete(sk, hdev->id, MGMT_OP_UNBLOCK_DEVICE, status, | 2545 | err = cmd_complete(sk, hdev->id, MGMT_OP_UNBLOCK_DEVICE, status, |
2546 | &cp->addr, sizeof(cp->addr)); | 2546 | &cp->addr, sizeof(cp->addr)); |