Skip to content

Commit

Permalink
Bluetooth: mgmt: Fix command status error code values
Browse files Browse the repository at this point in the history
Error codes in the command status should always be from the set of
values defined for mgmt and never e.g. POSIX error codes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Mar 2, 2012
1 parent 9f8ce96 commit d4f6852
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2745,7 +2745,7 @@ int mgmt_index_added(struct hci_dev *hdev)

int mgmt_index_removed(struct hci_dev *hdev)
{
u8 status = ENODEV;
u8 status = MGMT_STATUS_INVALID_PARAMS;

mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);

Expand Down Expand Up @@ -2798,7 +2798,7 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
update_class(hdev);
update_eir(hdev);
} else {
u8 status = ENETDOWN;
u8 status = MGMT_STATUS_NOT_POWERED;
mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);
}

Expand Down

0 comments on commit d4f6852

Please sign in to comment.