Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: of_dma: Correct return code for of_dma_request_slave_channel in case !CONFIG_OF

of_dma_request_slave_channel should return either pointer for valid
dma_chan or ERR_PTR() error code, NULL is not expected to be returned.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Peter Ujfalusi and committed by
Vinod Koul
500404eb bf55555b

+1 -1
+1 -1
include/linux/of_dma.h
··· 80 80 static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np, 81 81 const char *name) 82 82 { 83 - return NULL; 83 + return ERR_PTR(-ENODEV); 84 84 } 85 85 86 86 static inline struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,