staging: rtlwifi: use kcalloc instead of multiply
checkpatch emits multiple warnings of type WARNING:ALLOC_WITH_MULTIPLY: Prefer kcalloc over kzalloc with multiply Replace two calls to kzalloc() with calls to kcalloc(). Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>hifive-unleashed-5.1
parent
63fcb0ce01
commit
85d309d53f
|
@ -252,12 +252,11 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf)
|
||||||
sizeof(u8), GFP_ATOMIC);
|
sizeof(u8), GFP_ATOMIC);
|
||||||
if (!efuse_tbl)
|
if (!efuse_tbl)
|
||||||
return;
|
return;
|
||||||
efuse_word = kzalloc(EFUSE_MAX_WORD_UNIT * sizeof(u16 *), GFP_ATOMIC);
|
efuse_word = kcalloc(EFUSE_MAX_WORD_UNIT, sizeof(u16 *), GFP_ATOMIC);
|
||||||
if (!efuse_word)
|
if (!efuse_word)
|
||||||
goto out;
|
goto out;
|
||||||
for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
|
for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
|
||||||
efuse_word[i] = kzalloc(efuse_max_section * sizeof(u16),
|
efuse_word[i] = kcalloc(efuse_max_section, sizeof(u16), GFP_ATOMIC);
|
||||||
GFP_ATOMIC);
|
|
||||||
if (!efuse_word[i])
|
if (!efuse_word[i])
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue