diff options
author | 2019-08-15 11:32:52 +0300 | |
---|---|---|
committer | 2019-08-21 11:01:55 +0300 | |
commit | 3e9e38d918bd01068b5ccba17d69a8ae9bf56142 (patch) | |
tree | fd498692b4d0ddfba3ec06d821a79820f9c28c76 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | mtd: spi-nor: Fix Cadence QSPI RCU Schedule Stall (diff) | |
download | wireguard-linux-3e9e38d918bd01068b5ccba17d69a8ae9bf56142.tar.xz wireguard-linux-3e9e38d918bd01068b5ccba17d69a8ae9bf56142.zip |
mtd: spi-nor: Fix an error code in spi_nor_read_raw()
The problem is that if "ret" is negative then when we check if
"ret > len", that condition is going to be true because of type
promotion. So this patch re-orders the code to check for negatives
first and preserve those error codes.
Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions