Staging winbond: boolean negation and bitwise operation in wrong order
authorDiego Liziero <diegoliz@gmail.com>
Tue, 14 Apr 2009 02:33:54 +0000 (04:33 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:37 +0000 (11:00 -0700)
The semantic patch that makes this change is:
(http://www.emn.fr/x-info/coccinelle/)

@@ expression E; constant C; @@
(
- !E == C
+ E != C
)

Signed-off-by: Diego Liziero <diegoliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/winbond/mds.c

index c7af09257e6f2a5dcdd41c4e9bff7e1783910355..59d6d67a9f7e4ff85c8b31620100c8bee4c99973 100644 (file)
@@ -432,7 +432,7 @@ Mds_Tx(struct wbsoft_priv * adapter)
                return;
 
        //Only one thread can be run here
-       if (!atomic_inc_return(&pMds->TxThreadCount) == 1)
+       if (atomic_inc_return(&pMds->TxThreadCount) != 1)
                goto cleanup;
 
        // Start to fill the data