diff options
author | Julia Lawall <julia@diku.dk> | 2009-07-27 14:38:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-27 14:38:52 -0400 |
commit | 6cf5767c7107c606644503f3e95bc1855386a70f (patch) | |
tree | c4aa30d4b43668fbbb9114b07909028bc61ef528 /drivers/atm/solos-pci.c | |
parent | a44a4a006b860476881ec0098c36584036e1cb91 (diff) |
drivers/atm: Correct redundant test
str has already been tested. It seems that this test should be on the
recently returned value snr.
A simplified version of the semantic match that finds this problem is as
follows: (http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
expression E;
@@
if (x == NULL || ...) { ... when forall
return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
*x == NULL
|
*x != NULL
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/solos-pci.c')
-rw-r--r-- | drivers/atm/solos-pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 9359613addc5..307321b32cb3 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -372,7 +372,7 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb | |||
372 | } | 372 | } |
373 | 373 | ||
374 | snr = next_string(skb); | 374 | snr = next_string(skb); |
375 | if (!str) | 375 | if (!snr) |
376 | return -EIO; | 376 | return -EIO; |
377 | attn = next_string(skb); | 377 | attn = next_string(skb); |
378 | if (!attn) | 378 | if (!attn) |