Staging: bcm: Remove assignment in if condition reported by checkpatch.pl
authorKevin McKinney <klmckinney1@gmail.com>
Fri, 7 Oct 2011 22:50:11 +0000 (18:50 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 Oct 2011 16:18:21 +0000 (10:18 -0600)
There is a case where an assignment was being done
in an if condition. This patch removes the assignment
from the if condition and places the assignment above
the if statement; thereby improving the readability of
the code.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/bcm/Misc.c

index 4e900bb..0882e04 100644 (file)
@@ -1080,7 +1080,8 @@ static int bcm_parse_target_params(PMINI_ADAPTER Adapter)
        if (!buff)
                return -ENOMEM;
 
-       if ((Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL)) == NULL) {
+       Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL);
+       if (Adapter->pstargetparams == NULL) {
                kfree(buff);
                return -ENOMEM;
        }