Skip to content

Commit d68d8a7

Browse files
Zijun HuVudentz
authored andcommitted
Bluetooth: hci_conn: Remove a redundant check for HFP offload
Remove a redundant check !hdev->get_codec_config_data. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 parent c48439f commit d68d8a7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

net/bluetooth/hci_conn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ static int configure_datapath_sync(struct hci_dev *hdev, struct bt_codec *codec)
241241
__u8 vnd_len, *vnd_data = NULL;
242242
struct hci_op_configure_data_path *cmd = NULL;
243243

244+
/* Do not take below 2 checks as error since the 1st means user do not
245+
* want to use HFP offload mode and the 2nd means the vendor controller
246+
* do not need to send below HCI command for offload mode.
247+
*/
244248
if (!codec->data_path || !hdev->get_codec_config_data)
245249
return 0;
246250

247-
/* Do not take me as error */
248-
if (!hdev->get_codec_config_data)
249-
return 0;
250-
251251
err = hdev->get_codec_config_data(hdev, ESCO_LINK, codec, &vnd_len,
252252
&vnd_data);
253253
if (err < 0)

0 commit comments

Comments
 (0)