dmaengine: of_dma: Correct return code for of_dma_request_slave_channel in case ...
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 3 Nov 2015 10:28:10 +0000 (12:28 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 16 Nov 2015 03:33:21 +0000 (09:03 +0530)
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>
include/linux/of_dma.h

index 36112cdd665a7f881693105e2cbfd4737e0a9881..b90d8ec57c1fb43fcc182b59e3d3267c79c68865 100644 (file)
@@ -80,7 +80,7 @@ static inline int of_dma_router_register(struct device_node *np,
 static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
                                                     const char *name)
 {
-       return NULL;
+       return ERR_PTR(-ENODEV);
 }
 
 static inline struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,