Skip to content
Browse files

api: dma: fix issue of no-implemented reload

reload function is not implemented by every DMA driver.
So, add api's NULL check to make sure it is protected if not

Signed-off-by: Jun Li <>
  • Loading branch information...
jli157 authored and nashif committed May 7, 2019
1 parent b8494d9 commit cb39e4abb5f802443fd4400cf01da85043c46ffc
Showing with 5 additions and 1 deletion.
  1. +5 −1 include/dma.h
@@ -220,7 +220,11 @@ static inline int dma_reload(struct device *dev, u32_t channel,
const struct dma_driver_api *api =
(const struct dma_driver_api *)dev->driver_api;

return api->reload(dev, channel, src, dst, size);
if (api->reload) {
return api->reload(dev, channel, src, dst, size);

return -ENOSYS;


0 comments on commit cb39e4a

Please sign in to comment.
You can’t perform that action at this time.