diff options
author | Tobin C. Harding <me@tobin.cc> | 2017-09-05 16:53:43 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-17 16:35:26 +0200 |
commit | 85d309d53f7a6ecbe227a43c1aa2fdc31e2edd00 (patch) | |
tree | 46bb6925f4d83cfcc28721d78242a6ed55a80605 /drivers/staging/rtlwifi | |
parent | 63fcb0ce01ce43ba41474b483a090a4a4c6fc11b (diff) |
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>
Diffstat (limited to 'drivers/staging/rtlwifi')
-rw-r--r-- | drivers/staging/rtlwifi/efuse.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/rtlwifi/efuse.c b/drivers/staging/rtlwifi/efuse.c index 6d5e657017c6..d74c80d512c9 100644 --- a/drivers/staging/rtlwifi/efuse.c +++ b/drivers/staging/rtlwifi/efuse.c @@ -252,12 +252,11 @@ void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf) sizeof(u8), GFP_ATOMIC); if (!efuse_tbl) 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) goto out; for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) { - efuse_word[i] = kzalloc(efuse_max_section * sizeof(u16), - GFP_ATOMIC); + efuse_word[i] = kcalloc(efuse_max_section, sizeof(u16), GFP_ATOMIC); if (!efuse_word[i]) goto done; } |