Commit 273de92c authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville
Browse files

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: default avatarMichael Buesch <>
Reviewed-by: default avatarJohannes Berg <>
Signed-off-by: default avatarJohn W. Linville <>
parent 90ccda9b
......@@ -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,
} else
if (found->ies_allocated)
ies = krealloc(ies, ielen, GFP_ATOMIC);
ies = kmalloc(ielen, GFP_ATOMIC);
if (ies) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment