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>
This commit is contained in:
Michael Buesch 2009-04-25 22:28:55 +02:00 коммит произвёл John W. Linville
Родитель 90ccda9bac
Коммит 273de92c84
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -384,11 +384,9 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev,
} else { } else {
u8 *ies = found->pub.information_elements; u8 *ies = found->pub.information_elements;
if (found->ies_allocated) { if (found->ies_allocated)
if (ksize(ies) < ielen) ies = krealloc(ies, ielen, GFP_ATOMIC);
ies = krealloc(ies, ielen, else
GFP_ATOMIC);
} else
ies = kmalloc(ielen, GFP_ATOMIC); ies = kmalloc(ielen, GFP_ATOMIC);
if (ies) { if (ies) {