Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[deliverable/linux.git] / drivers / dma / stm32-dma.c
index 12f3a3eddba9254a7d72fc637c363e09152f08c5..047476a1383dd984edd2afeb2bf2e1bfd5867074 100644 (file)
@@ -437,7 +437,7 @@ static int stm32_dma_start_transfer(struct stm32_dma_chan *chan)
        if (!chan->desc) {
                vdesc = vchan_next_desc(&chan->vchan);
                if (!vdesc)
-                       return 0;
+                       return -EPERM;
 
                chan->desc = to_stm32_dma_desc(vdesc);
                chan->next_sg = 0;
@@ -559,7 +559,7 @@ static void stm32_dma_issue_pending(struct dma_chan *c)
        if (!chan->busy) {
                if (vchan_issue_pending(&chan->vchan) && !chan->desc) {
                        ret = stm32_dma_start_transfer(chan);
-                       if ((chan->desc->cyclic) && (!ret))
+                       if ((!ret) && (chan->desc->cyclic))
                                stm32_dma_configure_next_sg(chan);
                }
        }
This page took 0.02534 seconds and 5 git commands to generate.