drivers/net/wireless/mwifiex/cfg80211.c:2357 mwifiex_cfg80211_suspend()
error: potential null dereference 'mef_entry'
(kzalloc returns null)
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
return 0;
}
+ mef_entry = kzalloc(sizeof(*mef_entry), GFP_KERNEL);
+ if (!mef_entry)
+ return -ENOMEM;
+
memset(&mef_cfg, 0, sizeof(mef_cfg));
mef_cfg.num_entries = 1;
- mef_entry = kzalloc(sizeof(*mef_entry), GFP_KERNEL);
mef_cfg.mef_entry = mef_entry;
mef_entry->mode = MEF_MODE_HOST_SLEEP;
mef_entry->action = MEF_ACTION_ALLOW_AND_WAKEUP_HOST;