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