diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-04-25 22:28:55 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:42 -0400 |
commit | 273de92c8461776aaac7b32f8d5889a72b38ea10 (patch) | |
tree | 9a6b4d78fd3b81e321c2ee507b0e491dbde90baf /net/wireless | |
parent | 90ccda9baccec8223ca5456fbe49adf7264d1543 (diff) | |
download | kernel_samsung_crespo-273de92c8461776aaac7b32f8d5889a72b38ea10.zip kernel_samsung_crespo-273de92c8461776aaac7b32f8d5889a72b38ea10.tar.gz kernel_samsung_crespo-273de92c8461776aaac7b32f8d5889a72b38ea10.tar.bz2 |
cfg80211: Remove unnecessary ksize() call
This removes an unnecessary ksize() call. krealloc() will do this
test internally and won't perform any allocation if the space is
already sufficient to hold the data.
So remove the redundant check.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-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 723aeb3..5dd909a 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -384,11 +384,9 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev, } else { u8 *ies = found->pub.information_elements; - if (found->ies_allocated) { - if (ksize(ies) < ielen) - ies = krealloc(ies, ielen, - GFP_ATOMIC); - } else + if (found->ies_allocated) + ies = krealloc(ies, ielen, GFP_ATOMIC); + else ies = kmalloc(ielen, GFP_ATOMIC); if (ies) { |