Re: [PATCH 07/13] Bluetooth: hci_sync: Simplify hci_reset_sync()

From: Bartosz Golaszewski

Date: Tue Jun 23 2026 - 05:02:20 EST


On Mon, 22 Jun 2026 16:52:20 +0200, Zijun Hu <zijun.hu@xxxxxxxxxxxxxxxx> said:
> Return err directly instead of using an if/return pattern.
>
> Signed-off-by: Zijun Hu <zijun.hu@xxxxxxxxxxxxxxxx>
> ---
> net/bluetooth/hci_sync.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index 3be8c3581c6c..fce9f9526cb5 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -3678,10 +3678,8 @@ int hci_reset_sync(struct hci_dev *hdev)
>
> err = __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL,
> HCI_CMD_TIMEOUT);
> - if (err)
> - return err;
>
> - return 0;
> + return err;
> }
>
> static int hci_init0_sync(struct hci_dev *hdev)
>
> --
> 2.34.1
>
>

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>