staging: wilc1000: fix missing read_write setting when reading data
authorColin Ian King <colin.king@canonical.com>
Wed, 19 Dec 2018 16:30:07 +0000 (16:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:14:48 +0000 (17:14 +0100)
commit5b48bec5f6c818b7e4ca7c7ae7d7adfa742e9913
tree997a476aac42e6252455bc3210787e379e9d6ed7
parent55b3d640c3d1e455318f3cbdce184ededa4f32e9
staging: wilc1000: fix missing read_write setting when reading data

commit c58eef061dda7d843dcc0ad6fea7e597d4c377c0 upstream.

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: c5c77ba18ea6 ("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>
drivers/staging/wilc1000/wilc_sdio.c