diff options
author | Jassi Brar <jassi.brar@samsung.com> | 2010-10-20 11:56:26 +0900 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:51:39 -0800 |
commit | d583fb47af4da3c57e180bcf15c45515f4c00d1e (patch) | |
tree | fbb0605bcb01f00af97770a690223dab638f305b | |
parent | 7494cec14db6f4ba73234e15106797c764bd3318 (diff) | |
download | kernel_samsung_crespo-d583fb47af4da3c57e180bcf15c45515f4c00d1e.zip kernel_samsung_crespo-d583fb47af4da3c57e180bcf15c45515f4c00d1e.tar.gz kernel_samsung_crespo-d583fb47af4da3c57e180bcf15c45515f4c00d1e.tar.bz2 |
ARM: S3C_PL330: Debug potential null pointer reference
Using 'safe' version of iteration, since we delete the
list entry.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Change-Id: I4dd463c3e0627703c405a4ce5b385cdd3f03ce42
Signed-off-by: Choi jonghwan <jhbird.choi@samsung.com>
-rw-r--r-- | arch/arm/plat-samsung/s3c-pl330.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-samsung/s3c-pl330.c b/arch/arm/plat-samsung/s3c-pl330.c index 60f703c..3b88d8f 100644 --- a/arch/arm/plat-samsung/s3c-pl330.c +++ b/arch/arm/plat-samsung/s3c-pl330.c @@ -1172,7 +1172,7 @@ probe_err1: static int pl330_remove(struct platform_device *pdev) { struct s3c_pl330_dmac *dmac, *d; - struct s3c_pl330_chan *ch; + struct s3c_pl330_chan *ch, *cht; unsigned long flags; int del, found; @@ -1196,7 +1196,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, cht, &chan_list, node) { /* Only channels that are handled by this DMAC */ if (iface_of_dmac(dmac, ch->id)) |