diff mbox series

[v1] Bluetooth: hci_conn: Remove a redundant check for HFP offload

Message ID 1702055834-18008-1-git-send-email-quic_zijuhu@quicinc.com
State Accepted
Commit ebe00bbb01f39c04d5578b8071040d8e190f09f8
Headers show
Series [v1] Bluetooth: hci_conn: Remove a redundant check for HFP offload | expand

Commit Message

quic_zijuhu Dec. 8, 2023, 5:17 p.m. UTC
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(-)

Comments

bluez.test.bot@gmail.com Dec. 8, 2023, 5:56 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=808336

---Test result---

Test Summary:
CheckPatch                    PASS      0.62 seconds
GitLint                       PASS      0.32 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      27.52 seconds
CheckAllWarning               PASS      30.56 seconds
CheckSparse                   PASS      35.92 seconds
CheckSmatch                   PASS      98.80 seconds
BuildKernel32                 PASS      26.81 seconds
TestRunnerSetup               PASS      422.30 seconds
TestRunner_l2cap-tester       PASS      22.94 seconds
TestRunner_iso-tester         PASS      45.47 seconds
TestRunner_bnep-tester        PASS      6.99 seconds
TestRunner_mgmt-tester        PASS      167.73 seconds
TestRunner_rfcomm-tester      PASS      11.47 seconds
TestRunner_sco-tester         PASS      14.60 seconds
TestRunner_ioctl-tester       PASS      12.41 seconds
TestRunner_mesh-tester        PASS      8.83 seconds
TestRunner_smp-tester         PASS      10.05 seconds
TestRunner_userchan-tester    PASS      7.31 seconds
IncrementalBuild              PASS      25.60 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

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)