diff options
author | Julia Lawall <julia@diku.dk> | 2010-02-06 03:43:41 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-02-10 14:07:28 -0500 |
commit | 734c2992828c66cee3feb21ecd30a6ac44aecc51 (patch) | |
tree | c732007f463393046dc83cc3d6b5953cb076aa32 /drivers/dma | |
parent | 8f98781e0f15207b6ab33bee1fae05428be0475b (diff) |
drivers/dma: Correct NULL test
cohd_fin has already been verified not to be NULL, so the argument to
BUG_ON cannot be true.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
expression *x;
expression e;
identifier l;
@@
if (x == NULL || ...) {
... when forall
return ...; }
... when != goto l;
when != x = e
when != &x
*x == NULL
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/coh901318.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index b5f2ee0f8e2c..64a937262a40 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
@@ -613,8 +613,6 @@ static void dma_tasklet(unsigned long data) | |||
613 | cohd_fin->pending_irqs--; | 613 | cohd_fin->pending_irqs--; |
614 | cohc->completed = cohd_fin->desc.cookie; | 614 | cohc->completed = cohd_fin->desc.cookie; |
615 | 615 | ||
616 | BUG_ON(cohc->nbr_active_done && cohd_fin == NULL); | ||
617 | |||
618 | if (cohc->nbr_active_done == 0) | 616 | if (cohc->nbr_active_done == 0) |
619 | return; | 617 | return; |
620 | 618 | ||