staging: r8188eu: use sizeof instead of hardcoded firmware header size
authorMichael Straube <straube.linux@gmail.com>
Sun, 17 Apr 2022 17:54:38 +0000 (19:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 16:31:18 +0000 (18:31 +0200)
commit4e58dfad41320e65a3411c2c123fb115d3513335
tree91addef8a4464aa65e0bb1af8f9526f83d1a0323
parent60ca4cdf50ae184c868c6f5c05f7415f2383938b
staging: r8188eu: use sizeof instead of hardcoded firmware header size

Use sizeof() instead of hardcoding the firmware header size and add
a compile time check to ensure struct rt_firmware_hdr has the correct
size.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_fw.c