[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <8f809ae0094c89ed99efb4074472edd119db8ec1.1717540338.git.sean.wang@kernel.org>
Date: Tue, 4 Jun 2024 15:46:59 -0700
From: sean.wang@...nel.org
To: marcel@...tmann.org,
johan.hedberg@...il.com,
luiz.dentz@...il.com
Cc: linux-bluetooth@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Sean Wang <sean.wang@...iatek.com>
Subject: [PATCH 1/2] Bluetooth: btusb: mediatek: remove the unnecessary goto tag
From: Sean Wang <sean.wang@...iatek.com>
Remove the unnecessary goto tag whether there is an error or not, we have
to free the buffer at the end of the function.
Signed-off-by: Sean Wang <sean.wang@...iatek.com>
---
drivers/bluetooth/btusb.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 79aefdb3324d..fcdd660add19 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2953,12 +2953,9 @@ static int btusb_mtk_uhw_reg_write(struct btusb_data *data, u32 reg, u32 val)
0x5E,
reg >> 16, reg & 0xffff,
buf, 4, USB_CTRL_SET_TIMEOUT);
- if (err < 0) {
+ if (err < 0)
bt_dev_err(hdev, "Failed to write uhw reg(%d)", err);
- goto err_free_buf;
- }
-err_free_buf:
kfree(buf);
return err;
--
2.25.1
Powered by blists - more mailing lists