diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index 4e900bb6608a8daded1e15a499a15e9d547dba1e..0882e04963a22d20c9c5140d0d72b4496b4eb144 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; }