From: Kangjie Lu
Date: Tue, 25 Dec 2018 22:34:41 -0600
> When spi_write_then_read() fails, "data" can be uninitialized and thus
> may contain a random value; the following execution checks "data" with a
> mask, the result could be random.
>
> The fix inserts a check of spi_write_then_read(): if
When spi_write_then_read() fails, "data" can be uninitialized and thus
may contain a random value; the following execution checks "data" with a
mask, the result could be random.
The fix inserts a check of spi_write_then_read(): if it fails, always
returns -1.
Signed-off-by: Kangjie Lu
---
drive