]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
dmaengine/amba-pl08x: Call pl08x_free_txd() instead of calling kfree() directly
authorViresh Kumar <viresh.kumar@st.com>
Fri, 5 Aug 2011 10:02:45 +0000 (15:32 +0530)
committerVinod Koul <vinod.koul@intel.com>
Thu, 25 Aug 2011 14:05:07 +0000 (19:35 +0530)
pl08x_prep_channel_resources() is calling kfree() directly for txd(). To
maintain consistency in code call pl08x_free_txd() instead.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/amba-pl08x.c

index a59c3c47286c66757ca2b41a84872d11b4656ea8..849eab85514bcf8fd25dbd3786f871f4755cbfa4 100644 (file)
@@ -1174,7 +1174,9 @@ static int pl08x_prep_channel_resources(struct pl08x_dma_chan *plchan,
 
        num_llis = pl08x_fill_llis_for_desc(pl08x, txd);
        if (!num_llis) {
-               kfree(txd);
+               spin_lock_irqsave(&plchan->lock, flags);
+               pl08x_free_txd(pl08x, txd);
+               spin_unlock_irqrestore(&plchan->lock, flags);
                return -EINVAL;
        }