[PATCH] ASoC: atmel: Fix error handling in sam9x5_wm8731_driver_probe

Codrin.Ciubotariu at microchip.com Codrin.Ciubotariu at microchip.com
Wed Mar 16 05:09:43 PDT 2022


On 16.03.2022 13:15, Miaoqian Lin wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The device_node pointer is returned by of_parse_phandle()  with refcount
> incremented. We should use of_node_put() on it when done.
> 
> This function only calls of_node_put() in the regular path.
> And it will cause refcount leak in error path.
> 
> Fixes: fdbcb3cba54b ("ASoC: atmel: machine driver for at91sam9x5-wm8731 boards")
> Signed-off-by: Miaoqian Lin <linmq006 at gmail.com>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu at microchip.com>

Thanks!


More information about the linux-arm-kernel mailing list