[PATCH 07/13] Bluetooth: hci_sync: Simplify hci_reset_sync()
From: Zijun Hu
Date: Mon Jun 22 2026 - 10:56:33 EST
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