mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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:
parent
5b31fab938
commit
9c23bb412c
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user