Re: [PATCH] dmaengine: Add NULL check in lpc32xx_dmamux_reserve()
From: Vladimir Zapolskiy
Date: Mon Jun 16 2025 - 11:28:25 EST
Hi Charles,
On 6/16/25 13:46, Charles Han wrote:
The function of_find_device_by_node() may return NULL if the device
node cannot be found or if CONFIG_OF is not defined, dereferencing
please see my comments provided for lpc18xx-dmamux.c driver, all of
them are applicable here as well.
There is no problem to be fixed, the change also shall be dropped
in my opinion.
it without NULL check may lead to NULL dereference.
Add a check to verify whether the return value is NULL.
Fixes: 5d318b595982 ("dmaengine: Add dma router for pl08x in LPC32XX SoC")
Signed-off-by: Charles Han <hanchunchao@xxxxxxxxxx>
--
Best wishes,
Vladimir