staging: wilc1000: use correct data for memcpy in wilc_hif_pack_sta_param()
authorAjay Singh <ajay.kathat@microchip.com>
Mon, 2 Mar 2020 16:22:35 +0000 (16:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Mar 2020 06:55:02 +0000 (07:55 +0100)
Use correct data for memcpy in wilc_hif_pack_sta_param(). Its
reported by Smatch static code analyser tool as discussed in [1].

[1]. https://lore.kernel.org/linux-wireless/20200302092346.GA24308@kadam/

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20200302162226.4196-2-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/hif.c

index c8c41c2df4ec798ad1b40305fd70c00a7db04aee..6c7de2f8d3f26fc5ea6ab0d76965bb558daaf710 100644 (file)
@@ -801,7 +801,7 @@ static void wilc_hif_pack_sta_param(u8 *cur_byte, const u8 *mac,
 
        if (params->ht_capa) {
                *cur_byte++ = true;
-               memcpy(cur_byte, &params->ht_capa,
+               memcpy(cur_byte, params->ht_capa,
                       sizeof(struct ieee80211_ht_cap));
        } else {
                *cur_byte++ = false;