dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()
commita073dabeea79c4df630ede960e79c20b44c20f91
authorYu Kuai <yukuai3@huawei.com>
Mon, 17 Aug 2020 11:57:26 +0000 (17 19:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 09:47:33 +0000 (12 11:47 +0200)
tree61caae7610ad695a6d58f770797b273bad2bcd3a
parent6f67b9d38ab08c89ef5865ab8c60cecb49fee382
dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()

[ Upstream commit 0cef8e2c5a07d482ec907249dbd6687e8697677f ]

The reurn value of of_find_device_by_node() is not checked, thus null
pointer dereference will be triggered if of_find_device_by_node()
failed.

Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20200817115728.1706719-2-yukuai3@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/at_hdmac.c