summaryrefslogtreecommitdiffstats
path: root/drivers/dma/amba-pl08x.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-08-05 15:32:45 +0530
committerVinod Koul <vinod.koul@intel.com>2011-08-25 19:35:07 +0530
commit57001a606f845ce2eda21a0f23e6aab20ee0cb04 (patch)
treee66120a192e0a98b0c2d0ca0255331edeb6db0d2 /drivers/dma/amba-pl08x.c
parent0a2356572b1910cc977f4ccf3c9ee1ecab08327a (diff)
downloadop-kernel-dev-57001a606f845ce2eda21a0f23e6aab20ee0cb04.zip
op-kernel-dev-57001a606f845ce2eda21a0f23e6aab20ee0cb04.tar.gz
dmaengine/amba-pl08x: Call pl08x_free_txd() instead of calling kfree() directly
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>
Diffstat (limited to 'drivers/dma/amba-pl08x.c')
-rw-r--r--drivers/dma/amba-pl08x.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index a59c3c4..849eab8 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -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;
}
OpenPOWER on IntegriCloud