From: Jannik Becher Date: Tue, 20 Dec 2016 17:59:46 +0000 (+0100) Subject: staging: rtl8712: fixed little endian problem X-Git-Tag: v4.11-rc1~116^2~456 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=502c80744fcac6b16f28699469c70db499fe2f69;p=karo-tx-linux.git staging: rtl8712: fixed little endian problem Fixed a sparse warning. Using function le16_to_cpus() to avoid double assignment. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 590acb5aea3d..3518f1f0bcdd 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -199,7 +199,7 @@ static noinline_for_stack char *translate_scan(struct _adapter *padapter, iwe.cmd = SIOCGIWMODE; memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs), 2); - cap = le16_to_cpu(cap); + le16_to_cpus(&cap); if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) { if (cap & WLAN_CAPABILITY_BSS) iwe.u.mode = (u32)IW_MODE_MASTER;