-
由 Dan Carpenter 提交于
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: f384b352 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
3e9e38d9