Message ID | 149303ac0cac8dd5de5506b29d7a800a223bed79.1312190882.git.viresh.kumar@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 2667e0d..063970f 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -1202,7 +1202,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; }