Merge tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma
[firefly-linux-kernel-4.4.55.git] / drivers / dma / pl330.c
index 340f9e607cd8b90dfe75add027c18bd26d67f1e0..f513f77b1d85471ff0997f8d9f4755deca293621 100644 (file)
@@ -1424,8 +1424,8 @@ static int pl330_submit_req(struct pl330_thread *thrd,
                goto xfer_exit;
 
        if (ret > pl330->mcbufsz / 2) {
-               dev_info(pl330->ddma.dev, "%s:%d Trying increasing mcbufsz\n",
-                               __func__, __LINE__);
+               dev_info(pl330->ddma.dev, "%s:%d Try increasing mcbufsz (%i/%i)\n",
+                               __func__, __LINE__, ret, pl330->mcbufsz / 2);
                ret = -ENOMEM;
                goto xfer_exit;
        }
@@ -2584,12 +2584,14 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
 {
        struct dma_pl330_desc *desc;
        struct dma_pl330_chan *pch = to_pchan(chan);
-       struct pl330_dmac *pl330 = pch->dmac;
+       struct pl330_dmac *pl330;
        int burst;
 
        if (unlikely(!pch || !len))
                return NULL;
 
+       pl330 = pch->dmac;
+
        desc = __pl330_prep_dma_memcpy(pch, dst, src, len);
        if (!desc)
                return NULL;