mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 20:43:40 +00:00
rtl8188eu: Fix "fix some UBSAN and kmalloc warnings"
This fixes
commit 4a73c76f02
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date: Mon May 10 10:25:47 2021 -0500
rtl8188eu: fix some UBSAN and kmalloc warnings
For LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0).
The function argument 'upd' only exists, if
LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0),
hence move the 'if' block reading 'upd' inside the
'#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))' macro guard.
This commit is contained in:
parent
c708301cca
commit
0f6d12e144
1 changed files with 1 additions and 1 deletions
|
@ -4419,11 +4419,11 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
||||||
u16 frame_type;
|
u16 frame_type;
|
||||||
bool reg = false;
|
bool reg = false;
|
||||||
#endif
|
|
||||||
if (upd->global_stypes < 11)
|
if (upd->global_stypes < 11)
|
||||||
frame_type = (u16)BIT(upd->global_stypes << 4);
|
frame_type = (u16)BIT(upd->global_stypes << 4);
|
||||||
else
|
else
|
||||||
frame_type = 0;
|
frame_type = 0;
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_DEBUG_CFG80211
|
#ifdef CONFIG_DEBUG_CFG80211
|
||||||
DBG_88E(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
|
DBG_88E(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
|
||||||
frame_type, reg);
|
frame_type, reg);
|
||||||
|
|
Loading…
Reference in a new issue