Skip to content

Commit

Permalink
Staging: bcm: Remove assignment in if condition reported by checkpatc…
Browse files Browse the repository at this point in the history
…h.pl

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>
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Oct 11, 2011
1 parent a8a1cdd commit 9d4f1d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/bcm/Misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9d4f1d0

Please sign in to comment.