diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-27 16:34:40 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-27 16:34:40 +0200 |
commit | ae9a6149884e04b3460bd9d7ffe29c5ec8d223d8 (patch) | |
tree | 373e19c07802ce43862f4a37a141f628bca0a401 /drivers/fpga/machxo2-spi.c | |
parent | 8217f07a50236779880f13e87f99224cd9117f83 (diff) | |
parent | 5816b3e6577eaa676ceb00a848f0fd65fe2adc29 (diff) | |
download | lwn-ae9a6149884e04b3460bd9d7ffe29c5ec8d223d8.tar.gz lwn-ae9a6149884e04b3460bd9d7ffe29c5ec8d223d8.zip |
Merge 5.15-rc3 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga/machxo2-spi.c')
-rw-r--r-- | drivers/fpga/machxo2-spi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c index 1afb41aa20d7..ea2ec3c6815c 100644 --- a/drivers/fpga/machxo2-spi.c +++ b/drivers/fpga/machxo2-spi.c @@ -225,8 +225,10 @@ static int machxo2_write_init(struct fpga_manager *mgr, goto fail; get_status(spi, &status); - if (test_bit(FAIL, &status)) + if (test_bit(FAIL, &status)) { + ret = -EINVAL; goto fail; + } dump_status_reg(&status); spi_message_init(&msg); @@ -313,6 +315,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr, dump_status_reg(&status); if (!test_bit(DONE, &status)) { machxo2_cleanup(mgr); + ret = -EINVAL; goto fail; } @@ -335,6 +338,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr, break; if (++refreshloop == MACHXO2_MAX_REFRESH_LOOP) { machxo2_cleanup(mgr); + ret = -EINVAL; goto fail; } } while (1); |