From d8720f8e57d0d4d0abd5ca3025763d4a7cf4ff44 Mon Sep 17 00:00:00 2001 From: Tugce Sirin Date: Wed, 19 Mar 2014 18:49:52 +0200 Subject: [PATCH] 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 Signed-off-by: Tugce Sirin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index ebe53723a41d..f9ccf2371dba 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -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; -- 2.20.1