Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type."

This reverts commit b5e12ec38331 ("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 <bankarsandhya512@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hans de Goede and committed by
Greg Kroah-Hartman
bc8201e3 6982f867

+1 -1
+1 -1
drivers/staging/rtl8188eu/core/rtw_efuse.c
··· 102 102 if (!efuseTbl) 103 103 return; 104 104 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)); 106 106 if (!eFuseWord) { 107 107 DBG_88E("%s: alloc eFuseWord fail!\n", __func__); 108 108 goto eFuseWord_failed;