Re: [PATCH] Bluetooth: btbcm: Fix refcount leak in btbcm_get_board_name

From: Linus Walleij
Date: Sun Jun 05 2022 - 08:38:48 EST


On Sun, Jun 5, 2022 at 8:56 AM Miaoqian Lin <linmq006@xxxxxxxxx> wrote:

> of_find_node_by_path() returns a node pointer with refcount incremented,
> we should use of_node_put() on it when not need anymore.
> Add missing of_node_put() in the error path to avoid refcount leak.
>
> Fixes: 63fac3343b99 ("Bluetooth: btbcm: Support per-board firmware variants")
> Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>

Oops thanks!
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij