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>
This commit is contained in:
Chris Lu 2024-07-04 14:01:09 +08:00 committed by Luiz Augusto von Dentz
parent 936daee9cf
commit be71dfb9ad

View File

@ -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;