dmaengine: ti: k3-udma: add missing put_device() call in of_xudma_dev_get()
authorYu Kuai <yukuai3@huawei.com>
Thu, 18 Jun 2020 13:01:10 +0000 (21:01 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 24 Jun 2020 06:06:10 +0000 (11:36 +0530)
commit1438cde8fe9cb709b569f5829c4c892c0f3f15b3
treefdbfbc3cbad894865b050f24349647464263ec69
parent466257d9968ac79575831250b039dc07566c7b13
dmaengine: ti: k3-udma: add missing put_device() call in of_xudma_dev_get()

if of_find_device_by_node() succeed and platform_get_drvdata() failed,
of_xudma_dev_get() will return without put_device(), which will leak
the memory.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20200618130110.582543-1-yukuai3@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/k3-udma-private.c