From 9d4f1d0c9d1cf2fc4a73b6fff30aa129b9d1586e Mon Sep 17 00:00:00 2001 From: Kevin McKinney Date: Fri, 7 Oct 2011 18:50:11 -0400 Subject: [PATCH] Staging: bcm: Remove assignment in if condition reported by checkpatch.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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/bcm/Misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index 4e900bb6608a..0882e04963a2 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -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; } -- 2.34.1