mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 20:37:27 +00:00
Staging: wlan-ng: Fix smatch warning potential null reference
This patch fixes potential null dereference 'wlandev' in wlan-ng driver. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
168934c9d4
commit
d8720f8e57
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user