Skip to content

Commit 0eaf7c7

Browse files
Sergey ShtylyovVudentz
authored andcommitted
Bluetooth: hci_conn: do return error from hci_enhanced_setup_sync()
The commit e07a06b ("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: e07a06b ("Bluetooth: Convert SCO configure_datapath to hci_sync") Signed-off-by: Sergey Shtylyov <[email protected]> Reviewed-by: Paul Menzel <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 0b3725d commit 0eaf7c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/bluetooth/hci_conn.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ static int hci_enhanced_setup_sync(struct hci_dev *hdev, void *data)
339339
case BT_CODEC_TRANSPARENT:
340340
if (!find_next_esco_param(conn, esco_param_msbc,
341341
ARRAY_SIZE(esco_param_msbc)))
342-
return false;
342+
return -EINVAL;
343+
343344
param = &esco_param_msbc[conn->attempt - 1];
344345
cp.tx_coding_format.id = 0x03;
345346
cp.rx_coding_format.id = 0x03;

0 commit comments

Comments
 (0)