From: Tugce Sirin Date: Wed, 19 Mar 2014 16:49:52 +0000 (+0200) Subject: Staging: wlan-ng: Fix smatch warning potential null reference X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d8720f8e57d0d4d0abd5ca3025763d4a7cf4ff44;p=linux-beck.git 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 --- 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;