Bluetooth: hci_sync: Simplify hci_reset_sync()

Return the reset command status directly instead of storing it in a
local variable and using an if/return pattern.

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Zijun Hu 2026-06-25 22:19:54 -07:00 committed by Luiz Augusto von Dentz
parent 5b31fab938
commit 9c23bb412c

View File

@ -3754,16 +3754,10 @@ static const struct hci_init_stage hci_init0[] = {
int hci_reset_sync(struct hci_dev *hdev)
{
int err;
set_bit(HCI_RESET, &hdev->flags);
err = __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL,
HCI_CMD_TIMEOUT);
if (err)
return err;
return 0;
return __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL,
HCI_CMD_TIMEOUT);
}
/* Send a raw HCI reset for use by vendor drivers */