kernel/drivers/net/wireless/marvell/mwifiex/scan.c
.. .. @@ -2200,9 +2200,9 @@ 2200 2200 2201 2201 if (nd_config) { 2202 2202 adapter->nd_info = 2203 - kzalloc(sizeof(struct cfg80211_wowlan_nd_match) +2204 - sizeof(struct cfg80211_wowlan_nd_match *) *2205 - scan_rsp->number_of_sets, GFP_ATOMIC);2203 + kzalloc(struct_size(adapter->nd_info, matches,2204 + scan_rsp->number_of_sets),2205 + GFP_ATOMIC);2206 2206 2207 2207 if (adapter->nd_info) 2208 2208 adapter->nd_info->n_matches = scan_rsp->number_of_sets;