diff options
-rw-r--r-- | net/wireless/scan.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 723aeb3d9462..5dd909a4e601 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -384,11 +384,9 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev, | |||
384 | } else { | 384 | } else { |
385 | u8 *ies = found->pub.information_elements; | 385 | u8 *ies = found->pub.information_elements; |
386 | 386 | ||
387 | if (found->ies_allocated) { | 387 | if (found->ies_allocated) |
388 | if (ksize(ies) < ielen) | 388 | ies = krealloc(ies, ielen, GFP_ATOMIC); |
389 | ies = krealloc(ies, ielen, | 389 | else |
390 | GFP_ATOMIC); | ||
391 | } else | ||
392 | ies = kmalloc(ielen, GFP_ATOMIC); | 390 | ies = kmalloc(ielen, GFP_ATOMIC); |
393 | 391 | ||
394 | if (ies) { | 392 | if (ies) { |