Allocation function return memory that is properly aligned for most data
types, there is no need to manually align the buffer later.
On 64-bit systems this is particularly wrong as struct sta_info should
be 8-byte aligned so this calculation is guaranteed to misalign the
structure. If the architecture requires aligned access, this leads to
an alignment fault and panic.
Signed-off-by: John Keeping <john@metanate.com>
Building with GCC 12.2 results in:
/var/lib/dkms/licheerv-rtl8723ds/1.0/build/core/rtw_sta_mgt.c:
In function ‘rtw_mfree_stainfo’:
/var/lib/dkms/licheerv-rtl8723ds/1.0/build/core/rtw_sta_mgt.c:338:25:
warning: the comparison will always evaluate as ‘true’ for
the address of ‘lock’ will never be NULL [-Waddress]
338 | if (&psta->lock != NULL)
|
Remove the superfluous check.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This repository contains the Realtek driver V5.1.1.5_20523.20161209_BTCOEX20161208-1212.
At inclusion, the only changes from the Realtek version were to fix any compile
warnings or errors. With these changes, the driver builds on kernels through
4.11.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>