Bluetooth: btmtkuart: fix error handling in mtk_hci_wmt_sync()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 17 Mar 2022 07:57:40 +0000 (10:57 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 18 Mar 2022 16:12:08 +0000 (17:12 +0100)
commita76d269a4e86cfd7d4441e40adccfa67808fe6fa
tree620c01566e0c28d5db5bba1cc97df90666f92b57
parent9fa6b4cda3b414e990f008f45f9bcecbcb54d4d1
Bluetooth: btmtkuart: fix error handling in mtk_hci_wmt_sync()

This code has an uninitialized variable warning:

    drivers/bluetooth/btmtkuart.c:184 mtk_hci_wmt_sync()
    error: uninitialized symbol 'wc'.

But it also has error paths which have memory leaks.

Fixes: 8f550f55b155 ("Bluetooth: btmtkuart: rely on BT_MTK module")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmtkuart.c