buspirate_spi: Fix a missing error check during _init()
Change-Id: I17c6737853bf311b3f7aa9bfb10b54ce19e95ecc
Signed-off-by: Richard Hughes <richard@hughsie.com>
Reviewed-on: https://review.coreboot.org/c/30407
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/buspirate_spi.c b/buspirate_spi.c
index 437aa74..09f10c3 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -507,6 +507,8 @@
/* Enter raw SPI mode */
bp_commbuf[0] = 0x01;
ret = buspirate_sendrecv(bp_commbuf, 1, 0);
+ if (ret)
+ return 1;
if ((ret = buspirate_wait_for_string(bp_commbuf, "SPI")))
return ret;
if ((ret = buspirate_sendrecv(bp_commbuf, 0, 1)))