Commit 396fa30e authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: removes potential null dereference



This patch removes the error reported by smatch.
 - wilc_wfi_cfgoperations.c:674 scan() error:
   potential null dereference 'strHiddenNetwork.net_info'.  (kmalloc returns null)

Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2eaf35c1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -668,6 +668,8 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
				kmalloc_array(request->n_ssids,
					      sizeof(struct hidden_network),
					      GFP_KERNEL);
			if (!strHiddenNetwork.net_info)
				return -ENOMEM;
			strHiddenNetwork.n_ssids = request->n_ssids;