From 922e28b7dd867d244aeb0bf96724e58b130d3116 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 2 May 2021 19:05:30 +0200 Subject: realtek_mst_i2c_spi: Add missing braces As per the coding style, if one branch of a conditional statement needs braces, all other branches need to have braces as well. Change-Id: I69b762391165177857e9331f79f54b01149cf339 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/flashrom/+/52827 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Peter Marheine Reviewed-by: Edward O'Callaghan --- realtek_mst_i2c_spi.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'realtek_mst_i2c_spi.c') diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c index ae79fdd3b..27bcb4a00 100644 --- a/realtek_mst_i2c_spi.c +++ b/realtek_mst_i2c_spi.c @@ -476,30 +476,32 @@ static int get_params(int *i2c_bus, int *reset, int *enter_isp) reset_str = extract_programmer_param("reset-mcu"); if (reset_str) { - if (reset_str[0] == '1') + if (reset_str[0] == '1') { *reset = 1; - else if (reset_str[0] == '0') + } else if (reset_str[0] == '0') { *reset = 0; - else { + } else { msg_perr("%s: Incorrect param format, reset-mcu=1 or 0.\n", __func__); ret = SPI_GENERIC_ERROR; } - } else + } else { *reset = 0; /* Default behaviour is no MCU reset on tear-down. */ + } free(reset_str); isp_str = extract_programmer_param("enter-isp"); if (isp_str) { - if (isp_str[0] == '1') + if (isp_str[0] == '1') { *enter_isp = 1; - else if (isp_str[0] == '0') + } else if (isp_str[0] == '0') { *enter_isp = 0; - else { + } else { msg_perr("%s: Incorrect param format, enter-isp=1 or 0.\n", __func__); ret = SPI_GENERIC_ERROR; } - } else + } else { *enter_isp = 1; /* Default behaviour is enter ISP on setup. */ + } free(isp_str); _get_params_failed: -- cgit v1.2.3