]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8712: fixed little endian problem
authorJannik Becher <becher.jannik@gmail.com>
Tue, 20 Dec 2016 17:59:46 +0000 (18:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jan 2017 15:51:16 +0000 (16:51 +0100)
Fixed a sparse warning.
Using function le16_to_cpus() to avoid double assignment.

Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c

index 590acb5aea3d609c34432dc685cdf3e952aba98d..3518f1f0bcdd839d89c917d4d7187bb25b5e3738 100644 (file)
@@ -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;