Re: [PATCH] drivers/dma: fix reference count leaks in mmp_pdma_probe

From: Vinod Koul
Date: Mon Oct 25 2021 - 02:43:44 EST


On 11-09-21, 15:05, Xin Xiong wrote:
> The issue happens in an error handling path. If
> of_dma_controller_register() fails, the function simply prints error
> messages and returns error code, without decrementing the reference
> count of pdev->device incremented earlier by
> dma_async_device_register(), which may result in refcount leaks.
>
> Fix it by invoking dma_async_device_unregister() before returning the
> error code.

Pls use right subsystem tag, git log will tell u the same. I have fixe
dit up while applying

--
~Vinod