mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 04:36:13 +02:00
board: phytec: phytec_som_detection: Add missing assignment
Assign the return value of snprintf (total length) to a variable to properly check if the string has the correct length. Currently, this variable is always zero and the length check after snprintf will always fail. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
This commit is contained in:
parent
e8c10f9d24
commit
9ce3d264e3
@ -346,8 +346,8 @@ static int phytec_get_part_number(struct phytec_eeprom_data *data,
|
||||
return 0;
|
||||
}
|
||||
if (api2->som_type <= 3) {
|
||||
snprintf(part, PHYTEC_PART_NUMBER_MAX_LEN + 1, "%s.%s",
|
||||
product_name, api2->bom_rev);
|
||||
len = snprintf(part, PHYTEC_PART_NUMBER_MAX_LEN + 1, "%s.%s",
|
||||
product_name, api2->bom_rev);
|
||||
if (len != PHYTEC_PART_NUMBER_KSP_LEN)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user