From 2b0734a89d00b5cc6e0442d3221584cf65797c31 Mon Sep 17 00:00:00 2001 From: hhb <421806649@qq.com> Date: Thu, 26 Sep 2013 15:29:00 +0800 Subject: [PATCH] dma pl330: fix bug of dma chan list operation --- arch/arm/plat-rk/dma-pl330.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/plat-rk/dma-pl330.c b/arch/arm/plat-rk/dma-pl330.c index 302110878a73..1303a0e7d73d 100644 --- a/arch/arm/plat-rk/dma-pl330.c +++ b/arch/arm/plat-rk/dma-pl330.c @@ -1239,6 +1239,7 @@ static int pl330_remove(struct platform_device *pdev) { struct rk29_pl330_dmac *dmac, *d; struct rk29_pl330_chan *ch; + struct rk29_pl330_chan *ch_temp; unsigned long flags; int del, found; @@ -1262,7 +1263,7 @@ static int pl330_remove(struct platform_device *pdev) dmac = d; /* Remove all Channels that are managed only by this DMAC */ - list_for_each_entry(ch, &chan_list, node) { + list_for_each_entry_safe(ch, ch_temp, &chan_list, node) { /* Only channels that are handled by this DMAC */ if (iface_of_dmac(dmac, ch->id)) -- 2.34.1