Skip to content

Commit bc8201e

Browse files
jwrdegoedegregkh
authored andcommitted
Revert "Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type."
This reverts commit b5e12ec ("Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type."). This commit is wrong, the rtw_malloc2d helper function takes the size of the array elements as its 3th argument, whereas sizeof(*eFuseWord) gives the size of a pointer instead of the size of a u16. Since sizeof(void *) > sizeof(u16) this has no adverse effects, but it is still wrong. Cc: Sandhya Bankar <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6982f86 commit bc8201e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/rtl8188eu/core/rtw_efuse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
102102
if (!efuseTbl)
103103
return;
104104

105-
eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(*eFuseWord));
105+
eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
106106
if (!eFuseWord) {
107107
DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
108108
goto eFuseWord_failed;

0 commit comments

Comments
 (0)