
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/52829 ) Change subject: lspcon_i2c_spi: Release I2C fd on failed init ...................................................................... lspcon_i2c_spi: Release I2C fd on failed init Change-Id: Idec3cd349ab8d6e2ebb0fafae70c5d69bb2c8880 Signed-off-by: Angel Pons <th3fanbus@gmail.com> --- M lspcon_i2c_spi.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/29/52829/1 diff --git a/lspcon_i2c_spi.c b/lspcon_i2c_spi.c index b79e7f7..e2c4a3c 100644 --- a/lspcon_i2c_spi.c +++ b/lspcon_i2c_spi.c @@ -502,12 +502,14 @@ int ret = lspcon_i2c_spi_reset_mpu_stop(fd); if (ret) { msg_perr("%s: call to reset_mpu_stop failed.\n", __func__); + i2c_close(fd); return ret; } struct lspcon_i2c_spi_data *data = calloc(1, sizeof(struct lspcon_i2c_spi_data)); if (!data) { msg_perr("Unable to allocate space for extra SPI master data.\n"); + i2c_close(fd); return SPI_GENERIC_ERROR; } -- To view, visit https://review.coreboot.org/c/flashrom/+/52829 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idec3cd349ab8d6e2ebb0fafae70c5d69bb2c8880 Gerrit-Change-Number: 52829 Gerrit-PatchSet: 1 Gerrit-Owner: Angel Pons <th3fanbus@gmail.com> Gerrit-MessageType: newchange