mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
staging: rtl8188eu: Replace kzalloc with kcalloc
Replace kzalloc() function with its 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a, b, gfp) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e6718f686e
commit
891fd84760
1 changed files with 3 additions and 1 deletions
|
@ -88,7 +88,9 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
|
||||||
if (!efuseTbl)
|
if (!efuseTbl)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tmp = kzalloc(EFUSE_MAX_SECTION_88E * (sizeof(void *) + EFUSE_MAX_WORD_UNIT * sizeof(u16)), GFP_KERNEL);
|
tmp = kcalloc(EFUSE_MAX_SECTION_88E,
|
||||||
|
sizeof(void *) + EFUSE_MAX_WORD_UNIT * sizeof(u16),
|
||||||
|
GFP_KERNEL);
|
||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
|
DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
|
||||||
goto eFuseWord_failed;
|
goto eFuseWord_failed;
|
||||||
|
|
Loading…
Reference in a new issue