linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: hci_conn: Remove a redundant check for HFP offload
@ 2023-12-08 17:17 Zijun Hu
  2023-12-08 17:56 ` [v1] " bluez.test.bot
  2024-04-22 14:46 ` [PATCH v1 RESEND] " Zijun Hu
  0 siblings, 2 replies; 5+ messages in thread
From: Zijun Hu @ 2023-12-08 17:17 UTC (permalink / raw)
  To: luiz.dentz, marcel, johan.hedberg; +Cc: linux-bluetooth, quic_zijuhu

Remove a redundant check !hdev->get_codec_config_data.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
 net/bluetooth/hci_conn.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index a41d2693f4d8..a4c96bd202fd 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -300,13 +300,13 @@ static int configure_datapath_sync(struct hci_dev *hdev, struct bt_codec *codec)
 	__u8 vnd_len, *vnd_data = NULL;
 	struct hci_op_configure_data_path *cmd = NULL;
 
+	/* Do not take below 2 checks as error since the 1st means user do not
+	 * want to use HFP offload mode and the 2nd means the vendor controller
+	 * do not need to send below HCI command for offload mode.
+	 */
 	if (!codec->data_path || !hdev->get_codec_config_data)
 		return 0;
 
-	/* Do not take me as error */
-	if (!hdev->get_codec_config_data)
-		return 0;
-
 	err = hdev->get_codec_config_data(hdev, ESCO_LINK, codec, &vnd_len,
 					  &vnd_data);
 	if (err < 0)
-- 
The Qualcomm Innovation Center


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-22 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08 17:17 [PATCH v1] Bluetooth: hci_conn: Remove a redundant check for HFP offload Zijun Hu
2023-12-08 17:56 ` [v1] " bluez.test.bot
2024-04-22 14:46 ` [PATCH v1 RESEND] " Zijun Hu
2024-04-22 15:30   ` patchwork-bot+bluetooth
2024-04-22 15:34   ` [v1,RESEND] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).