dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()
authorYu Kuai <yukuai3@huawei.com>
Mon, 17 Aug 2020 11:57:26 +0000 (19:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:13 +0000 (19:14 +0200)
commite3149ca07e92d20ea8ecf2a9bdfadf7adf4525c9
tree0cbd7ab97f158b4fdbca5f4ad3a73a5c1e1af793
parentc6156f0064b14af0c8acb52860b8cc3eb175867b
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