diff options
author | Chris Lu <chris.lu@mediatek.com> | 2024-07-04 08:01:09 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-07-15 16:11:37 +0200 |
commit | be71dfb9ad2042bba713975ef50c3a5b0429f1d2 (patch) | |
tree | 98bcc977ad376d588368dc246dc901bb49815a54 /drivers/bluetooth | |
parent | Bluetooth: Remove hci_request.{c,h} (diff) | |
download | linux-be71dfb9ad2042bba713975ef50c3a5b0429f1d2.tar.xz linux-be71dfb9ad2042bba713975ef50c3a5b0429f1d2.zip |
Bluetooth: btusb: mediatek: remove the unnecessary goto tag
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@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btusb.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 2d5c971a59ad..4448c5f220f0 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2957,12 +2957,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; |