staging: ks7010: use le16_to_cpu() to access __le16 field
authorRichard Porter <dick@acm.org>
Sun, 4 Jun 2017 10:10:12 +0000 (11:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Jun 2017 14:54:19 +0000 (16:54 +0200)
Fixes sparse warning:
drivers/staging/ks7010/ks_hostif.c:959:24: warning: restricted __le16
degrades to integer

Signed-off-by: Richard Porter <dick@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index 79634be1b873ed40123d6757d332df596f78f18d..697347bb8760048bdc885c018f216ca2cf044508 100644 (file)
@@ -956,7 +956,7 @@ void hostif_associate_indication(struct ks_wlan_private *priv)
        wrqu.data.length += sizeof(associnfo_leader1) - 1;
        pbuf += sizeof(associnfo_leader1) - 1;
 
-       pb += assoc_req->req_ies_size;
+       pb += le16_to_cpu(assoc_req->req_ies_size);
        for (i = 0; i < le16_to_cpu(assoc_resp->resp_ies_size); i++)
                pbuf += sprintf(pbuf, "%02x", *(pb + i));
        wrqu.data.length += (le16_to_cpu(assoc_resp->resp_ies_size)) * 2;