summaryrefslogtreecommitdiff
path: root/drivers/dma/of-dma.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2021-01-15 12:48:43 +0200
committerTony Lindgren <tony@atomide.com>2021-01-15 12:48:43 +0200
commit715a1284d89a740b197b3bad5eb20d36a397382f (patch)
tree07ad2960ab66e56b3d1e151036262019a18e3df1 /drivers/dma/of-dma.c
parent181739822cf6f8f4e12b173913af2967a28906c0 (diff)
parent06862d789ddde8a99c1e579e934ca17c15a84755 (diff)
Merge branch 'cpuidle-fix' into fixes
Diffstat (limited to 'drivers/dma/of-dma.c')
-rw-r--r--drivers/dma/of-dma.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index 8a4f608904b9..ec00b20ae8e4 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -75,8 +75,18 @@ static struct dma_chan *of_dma_router_xlate(struct of_phandle_args *dma_spec,
ofdma->dma_router->route_free(ofdma->dma_router->dev,
route_data);
} else {
+ int ret = 0;
+
chan->router = ofdma->dma_router;
chan->route_data = route_data;
+
+ if (chan->device->device_router_config)
+ ret = chan->device->device_router_config(chan);
+
+ if (ret) {
+ dma_release_channel(chan);
+ chan = ERR_PTR(ret);
+ }
}
/*