mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 20:46:50 +07:00
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: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2eaf35c141
commit
396fa30e4b
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user