Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;