dmaengine: imx-sdma: Fix error checking in sdma_event_remap
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 8 Mar 2022 06:49:51 +0000 (06:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 11:14:10 +0000 (13:14 +0200)
commite4333c4ff0e3e578b90f0dfc2ee7980efaa856a7
treec9fe7365bdac6bd70f45654833bd9fa9cf14f546
parent7c0eb4d18894923c18e1bf5fd5995de1dc2ad5a4
dmaengine: imx-sdma: Fix error checking in sdma_event_remap

[ Upstream commit 7104b9cb35a33ad803a1adbbfa50569b008faf15 ]

of_parse_phandle() returns NULL on errors, rather than error
pointers. Using NULL check on grp_np to fix this.

Fixes: d078cd1b4185 ("dmaengine: imx-sdma: Add imx6sx platform support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220308064952.15743-1-linmq006@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/imx-sdma.c