Re: [PATCH] Bluetooth: hci_conn: do return error from hci_enhanced_setup_sync()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Sergey,


Thank you for your patch.

Am 05.08.25 um 21:14 schrieb Sergey Shtylyov:
The commit e07a06b4eb41 ("Bluetooth: Convert SCO configure_datapath to
hci_sync") missed to update the *return* statement under the *case* of
BT_CODEC_TRANSPARENT in hci_enhanced_setup_sync(), which led to returning
success (0) instead of the negative error code (-EINVAL).  However, the
result of hci_enhanced_setup_sync() seems to be ignored anyway, since NULL
gets passed to hci_cmd_sync_queue() as the last argument in that case and
the only function interested in that result is specified by that argument.

Fixes: e07a06b4eb41 ("Bluetooth: Convert SCO configure_datapath to hci_sync")
Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

---
The patch is against the master branch of the bluetooth.git repo...

  net/bluetooth/hci_conn.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Index: bluetooth/net/bluetooth/hci_conn.c
===================================================================
--- bluetooth.orig/net/bluetooth/hci_conn.c
+++ bluetooth/net/bluetooth/hci_conn.c
@@ -339,7 +339,8 @@ static int hci_enhanced_setup_sync(struc
  	case BT_CODEC_TRANSPARENT:
  		if (!find_next_esco_param(conn, esco_param_msbc,
  					  ARRAY_SIZE(esco_param_msbc)))
-			return false;
+			return -EINVAL;
+
  		param = &esco_param_msbc[conn->attempt - 1];
  		cp.tx_coding_format.id = 0x03;
  		cp.rx_coding_format.id = 0x03;

Reviewed-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>


Kind regards,

Paul




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux