Commit c07ba878 authored by Dan Carpenter's avatar Dan Carpenter Committed by Luiz Augusto von Dentz
Browse files

Bluetooth: hci_sync: unlock on error in hci_inquiry_result_with_rssi_evt()



Add unlocks to two error paths in hci_inquiry_result_with_rssi_evt().

Fixes: fee64503 ("Bluetooth: hci_event: Use skb_pull_data when processing inquiry results")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 386f626a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4534,7 +4534,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, void *edata,
			if (!info) {
				bt_dev_err(hdev, "Malformed HCI Event: 0x%2.2x",
					   HCI_EV_INQUIRY_RESULT_WITH_RSSI);
				return;
				goto unlock;
			}

			bacpy(&data.bdaddr, &info->bdaddr);
@@ -4565,7 +4565,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, void *edata,
			if (!info) {
				bt_dev_err(hdev, "Malformed HCI Event: 0x%2.2x",
					   HCI_EV_INQUIRY_RESULT_WITH_RSSI);
				return;
				goto unlock;
			}

			bacpy(&data.bdaddr, &info->bdaddr);
@@ -4587,7 +4587,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, void *edata,
		bt_dev_err(hdev, "Malformed HCI Event: 0x%2.2x",
			   HCI_EV_INQUIRY_RESULT_WITH_RSSI);
	}

unlock:
	hci_dev_unlock(hdev);
}