Message ID | 1713797194-22982-1-git-send-email-quic_zijuhu@quicinc.com |
---|---|
State | Accepted |
Commit | 22de24b6c6c1003496d2f144bf9265d9041499fc |
Headers | show |
Series | [v1,RESEND] Bluetooth: hci_conn: Remove a redundant check for HFP offload | expand |
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Mon, 22 Apr 2024 22:46:34 +0800 you wrote: > 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(-) Here is the summary with links: - [v1,RESEND] Bluetooth: hci_conn: Remove a redundant check for HFP offload https://git.kernel.org/bluetooth/bluetooth-next/c/ebe00bbb01f3 You are awesome, thank you!
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index a3b226255eb9..81166a5bc034 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -242,13 +242,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)
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(-)