aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-01-20 07:27:14 -0500
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-01-22 22:48:27 -0500
commite57e619f463e7841940ef1b98969e23f71f5ee8a (patch)
tree49f968f3508d38fab2fb9f9901d16e51407248a7 /net/bluetooth
parent4ae14301c3b180adaf6b72285499e7404819a023 (diff)
Bluetooth: Fix returning proper mgmt status for Load LTKs
Failures of mgmt commands should be indicated with valid mgmt status codes, and EINVAL is not one of them. Instead MGMT_STATUS_INVALID_PARAMS should be returned. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index d9b042efbf42..a050eee61623 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2716,7 +2716,7 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
2716 BT_ERR("load_keys: expected %u bytes, got %u bytes", 2716 BT_ERR("load_keys: expected %u bytes, got %u bytes",
2717 len, expected_len); 2717 len, expected_len);
2718 return cmd_status(sk, hdev->id, MGMT_OP_LOAD_LONG_TERM_KEYS, 2718 return cmd_status(sk, hdev->id, MGMT_OP_LOAD_LONG_TERM_KEYS,
2719 EINVAL); 2719 MGMT_STATUS_INVALID_PARAMS);
2720 } 2720 }
2721 2721
2722 BT_DBG("%s key_count %u", hdev->name, key_count); 2722 BT_DBG("%s key_count %u", hdev->name, key_count);