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:
Tugce Sirin 2014-03-19 18:49:52 +02:00 committed by Greg Kroah-Hartman
parent 168934c9d4
commit d8720f8e57
1 changed files with 1 additions and 1 deletions

View File

@ -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;