|
@@ -1641,6 +1641,12 @@ static void atc_free_chan_resources(struct dma_chan *chan)
|
|
atchan->descs_allocated = 0;
|
|
atchan->descs_allocated = 0;
|
|
atchan->status = 0;
|
|
atchan->status = 0;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Free atslave allocated in at_dma_xlate()
|
|
|
|
+ */
|
|
|
|
+ kfree(chan->private);
|
|
|
|
+ chan->private = NULL;
|
|
|
|
+
|
|
dev_vdbg(chan2dev(chan), "free_chan_resources: done\n");
|
|
dev_vdbg(chan2dev(chan), "free_chan_resources: done\n");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1675,7 +1681,7 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
|
|
dma_cap_zero(mask);
|
|
dma_cap_zero(mask);
|
|
dma_cap_set(DMA_SLAVE, mask);
|
|
dma_cap_set(DMA_SLAVE, mask);
|
|
|
|
|
|
- atslave = devm_kzalloc(&dmac_pdev->dev, sizeof(*atslave), GFP_KERNEL);
|
|
|
|
|
|
+ atslave = kzalloc(sizeof(*atslave), GFP_KERNEL);
|
|
if (!atslave)
|
|
if (!atslave)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|