Commit fa1bd918 authored by Mikel Astiz's avatar Mikel Astiz Committed by Gustavo Padovan

Bluetooth: Fix minor coding style in hci_event.c

Replace the status checks with the short form of the boolean expression.
Signed-off-by: default avatarMikel Astiz <mikel.astiz@bmw-carit.de>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent cdcba7c6
...@@ -303,7 +303,7 @@ static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -303,7 +303,7 @@ static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb)
hci_dev_lock(hdev); hci_dev_lock(hdev);
if (status != 0) { if (status) {
mgmt_write_scan_failed(hdev, param, status); mgmt_write_scan_failed(hdev, param, status);
hdev->discov_timeout = 0; hdev->discov_timeout = 0;
goto done; goto done;
...@@ -925,7 +925,7 @@ static void hci_cc_pin_code_reply(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -925,7 +925,7 @@ static void hci_cc_pin_code_reply(struct hci_dev *hdev, struct sk_buff *skb)
if (test_bit(HCI_MGMT, &hdev->dev_flags)) if (test_bit(HCI_MGMT, &hdev->dev_flags))
mgmt_pin_code_reply_complete(hdev, &rp->bdaddr, rp->status); mgmt_pin_code_reply_complete(hdev, &rp->bdaddr, rp->status);
if (rp->status != 0) if (rp->status)
goto unlock; goto unlock;
cp = hci_sent_cmd_data(hdev, HCI_OP_PIN_CODE_REPLY); cp = hci_sent_cmd_data(hdev, HCI_OP_PIN_CODE_REPLY);
...@@ -1893,7 +1893,7 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -1893,7 +1893,7 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
if (test_and_clear_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags) && if (test_and_clear_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags) &&
(conn->type == ACL_LINK || conn->type == LE_LINK)) { (conn->type == ACL_LINK || conn->type == LE_LINK)) {
if (ev->status != 0) if (ev->status)
mgmt_disconnect_failed(hdev, &conn->dst, conn->type, mgmt_disconnect_failed(hdev, &conn->dst, conn->type,
conn->dst_type, ev->status); conn->dst_type, ev->status);
else else
...@@ -3262,7 +3262,7 @@ static void hci_simple_pair_complete_evt(struct hci_dev *hdev, ...@@ -3262,7 +3262,7 @@ static void hci_simple_pair_complete_evt(struct hci_dev *hdev,
* initiated the authentication. A traditional auth_complete * initiated the authentication. A traditional auth_complete
* event gets always produced as initiator and is also mapped to * event gets always produced as initiator and is also mapped to
* the mgmt_auth_failed event */ * the mgmt_auth_failed event */
if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status != 0) if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status)
mgmt_auth_failed(hdev, &conn->dst, conn->type, conn->dst_type, mgmt_auth_failed(hdev, &conn->dst, conn->type, conn->dst_type,
ev->status); ev->status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment