mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
staging: wilc1000: fix missing read_write setting when reading data
Currently the cmd.read_write setting is not initialized so it contains
garbage from the stack. Fix this by setting it to 0 to indicate a
read is required.
Detected by CoverityScan, CID#1357925 ("Uninitialized scalar variable")
Fixes: c5c77ba18e
("staging: wilc1000: Add SDIO/SPI 802.11 driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
012c5e8d81
commit
c58eef061d
@ -861,6 +861,7 @@ static int sdio_read_int(struct wilc *wilc, u32 *int_status)
|
||||
if (!sdio_priv->irq_gpio) {
|
||||
int i;
|
||||
|
||||
cmd.read_write = 0;
|
||||
cmd.function = 1;
|
||||
cmd.address = 0x04;
|
||||
cmd.data = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user