staging: r8188eu: change the type of a variable in rtw_read16()
authorFabio M. De Francesco <fmdefrancesco@gmail.com>
Fri, 24 Sep 2021 12:27:00 +0000 (14:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Sep 2021 15:37:12 +0000 (17:37 +0200)
commit1b77e29e7bf41424f74ef1a8d6555614819489ca
treec5cf2b36e03167d1a87afc16d60b0e2ff1e7fbdc
parent6386030e10df44429e1661fff598f36ed21a3502
staging: r8188eu: change the type of a variable in rtw_read16()

Change the type of "data" from __le32 to __le16. The size of the data
that usbctrl_vendorreq() will read is two bytes in little endian order,
so the most suitable type is __le16.

With the old code, since the two most significant bytes of data are not
initialized, KMSan can likely detect the reading of uninitialized data,
so this change can prevent the checker from complaining.

Co-developed-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210924122705.3781-12-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/usb_ops_linux.c