Commit d8720f8e authored by Tugce Sirin's avatar Tugce Sirin Committed by Greg Kroah-Hartman

Staging: wlan-ng: Fix smatch warning potential null reference

This patch fixes potential null dereference 'wlandev' in wlan-ng driver.
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarTugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 168934c9
......@@ -1924,7 +1924,7 @@ static wlandevice_t *create_wlan(void)
hw = kzalloc(sizeof(hfa384x_t), GFP_KERNEL);
if (!wlandev || !hw) {
netdev_err(wlandev->netdev, "%s: Memory allocation failure.\n", dev_info);
pr_err("%s: Memory allocation failure.\n", dev_info);
kfree(wlandev);
kfree(hw);
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment