Skip to content

Commit 3c20ba5

Browse files
arndbVinod Koul
authored andcommitted
dmaengine: mmp-tdma: fix terminate_all return code
In a recent cleanup, the mmp_tdma_terminate_all function was introduced but does not set a proper return value. Almost no slave driver uses that return value, but if one does, the result will be undefined, which the compiler warns about: dma/mmp_tdma.c: In function 'mmp_tdma_terminate_all': dma/mmp_tdma.c:474:1: warning: no return statement in function returning non-void [-Wreturn-type] This changes the driver to return zero, like most other drivers do. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: f43a6fd ("dmaengine: mmp-tdma: Split device_control") Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent 2f56eaf commit 3c20ba5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/dma/mmp_tdma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ static int mmp_tdma_terminate_all(struct dma_chan *chan)
471471
mmp_tdma_disable_chan(chan);
472472
/* disable interrupt */
473473
mmp_tdma_enable_irq(tdmac, false);
474+
475+
return 0;
474476
}
475477

476478
static int mmp_tdma_config(struct dma_chan *chan,

0 commit comments

Comments
 (0)