mirror of
				https://review.coreboot.org/flashrom.git
				synced 2025-10-31 05:10:41 +01:00 
			
		
		
		
	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>
This commit is contained in:
		 Angel Pons
					Angel Pons
				
			
				
					committed by
					
						 Edward O'Callaghan
						Edward O'Callaghan
					
				
			
			
				
	
			
			
			 Edward O'Callaghan
						Edward O'Callaghan
					
				
			
						parent
						
							0e408f99c6
						
					
				
				
					commit
					922e28b7dd
				
			| @@ -476,30 +476,32 @@ static int get_params(int *i2c_bus, int *reset, int *enter_isp) | |||||||
|  |  | ||||||
| 	reset_str = extract_programmer_param("reset-mcu"); | 	reset_str = extract_programmer_param("reset-mcu"); | ||||||
| 	if (reset_str) { | 	if (reset_str) { | ||||||
| 		if (reset_str[0] == '1') | 		if (reset_str[0] == '1') { | ||||||
| 			*reset = 1; | 			*reset = 1; | ||||||
| 		else if (reset_str[0] == '0') | 		} else if (reset_str[0] == '0') { | ||||||
| 			*reset = 0; | 			*reset = 0; | ||||||
| 		else { | 		} else { | ||||||
| 			msg_perr("%s: Incorrect param format, reset-mcu=1 or 0.\n", __func__); | 			msg_perr("%s: Incorrect param format, reset-mcu=1 or 0.\n", __func__); | ||||||
| 			ret = SPI_GENERIC_ERROR; | 			ret = SPI_GENERIC_ERROR; | ||||||
| 		} | 		} | ||||||
| 	} else | 	} else { | ||||||
| 		*reset = 0; /* Default behaviour is no MCU reset on tear-down. */ | 		*reset = 0; /* Default behaviour is no MCU reset on tear-down. */ | ||||||
|  | 	} | ||||||
| 	free(reset_str); | 	free(reset_str); | ||||||
|  |  | ||||||
| 	isp_str = extract_programmer_param("enter-isp"); | 	isp_str = extract_programmer_param("enter-isp"); | ||||||
| 	if (isp_str) { | 	if (isp_str) { | ||||||
| 		if (isp_str[0] == '1') | 		if (isp_str[0] == '1') { | ||||||
| 			*enter_isp = 1; | 			*enter_isp = 1; | ||||||
| 		else if (isp_str[0] == '0') | 		} else if (isp_str[0] == '0') { | ||||||
| 			*enter_isp = 0; | 			*enter_isp = 0; | ||||||
| 		else { | 		} else { | ||||||
| 			msg_perr("%s: Incorrect param format, enter-isp=1 or 0.\n", __func__); | 			msg_perr("%s: Incorrect param format, enter-isp=1 or 0.\n", __func__); | ||||||
| 			ret = SPI_GENERIC_ERROR; | 			ret = SPI_GENERIC_ERROR; | ||||||
| 		} | 		} | ||||||
| 	} else | 	} else { | ||||||
| 		*enter_isp = 1; /* Default behaviour is enter ISP on setup. */ | 		*enter_isp = 1; /* Default behaviour is enter ISP on setup. */ | ||||||
|  | 	} | ||||||
| 	free(isp_str); | 	free(isp_str); | ||||||
|  |  | ||||||
| _get_params_failed: | _get_params_failed: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user