summaryrefslogtreecommitdiffstats
path: root/realtek_mst_i2c_spi.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-05-02 19:05:30 +0200
committerEdward O'Callaghan <quasisec@chromium.org>2021-05-09 03:33:11 +0000
commit922e28b7dd867d244aeb0bf96724e58b130d3116 (patch)
tree6e025c506a33f1c62518755bb2145c6de8e136e8 /realtek_mst_i2c_spi.c
parent0e408f99c6f21dea8f0a4a65e316050c34a4225e (diff)
downloadflashrom-922e28b7dd867d244aeb0bf96724e58b130d3116.tar.gz
flashrom-922e28b7dd867d244aeb0bf96724e58b130d3116.tar.bz2
flashrom-922e28b7dd867d244aeb0bf96724e58b130d3116.zip
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 <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/52827 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'realtek_mst_i2c_spi.c')
-rw-r--r--realtek_mst_i2c_spi.c18
1 files changed, 10 insertions, 8 deletions
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: