aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-06-04 16:17:37 -0700
committerDavid S. Miller <davem@davemloft.net>2010-06-04 16:17:37 -0700
commit0d0659c78d7ea29ad6c3c538dcaae0227f31b9d2 (patch)
tree4383a16168096e94919c980a2cbcd7a5e81c6492 /arch/sparc
parentsparc64: Update defconfig. (diff)
downloadlinux-dev-0d0659c78d7ea29ad6c3c538dcaae0227f31b9d2.tar.xz
linux-dev-0d0659c78d7ea29ad6c3c538dcaae0227f31b9d2.zip
arch/sparc/kernel: Eliminate what looks like a NULL pointer dereference
At the point of the test, action cannot be NULL, as it has been dereferenced in the code just above. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any } else S3 // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/sun4d_irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index ab036a72de5a..e11b4612dabb 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -183,7 +183,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id)
goto out_unlock;
}
- if (action && tmp)
+ if (tmp)
tmp->next = action->next;
else
*actionp = action->next;