Hi,

Please find the latest report on new defect(s) introduced to coreboot found 
with Coverity Scan.

2 new defect(s) introduced to coreboot found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1544382:  Null pointer dereferences  (REVERSE_INULL)
/src/drivers/i2c/rt5645/rt5645.c: 30 in rt5645_fill_ssdt()


________________________________________________________________________________________________________
*** CID 1544382:  Null pointer dereferences  (REVERSE_INULL)
/src/drivers/i2c/rt5645/rt5645.c: 30 in rt5645_fill_ssdt()
24              .speed = config->bus_speed ? : I2C_SPEED_FAST,
25              .resource = scope,
26      };
27      struct acpi_dp *dp;
28      int curr_index = 0;
29     
>>>     CID 1544382:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "config" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
30      if (!config)
31              return;
32     
33      const char *name = acpi_device_name(dev);
34      if (!scope || !name)
35              return;

** CID 1544381:  Integer handling issues  (DIVIDE_BY_ZERO)
/src/mainboard/dell/optiplex_9020/mainboard.c: 310 in get_pkg_power()


________________________________________________________________________________________________________
*** CID 1544381:  Integer handling issues  (DIVIDE_BY_ZERO)
/src/mainboard/dell/optiplex_9020/mainboard.c: 310 in get_pkg_power()
304     static uint16_t get_pkg_power(void)
305     {
306             uint8_t rapl_power_unit = rdmsr(0x606).lo & 0xf;
307             if (rapl_power_unit)
308                     rapl_power_unit = 2 << (rapl_power_unit - 1);
309             uint16_t pkg_power_info = rdmsr(0x614).lo & 0x7fff;
>>>     CID 1544381:  Integer handling issues  (DIVIDE_BY_ZERO)
>>>     In expression "pkg_power_info / rapl_power_unit", division by 
>>> expression "rapl_power_unit" which may be zero has undefined behavior.
310             if (pkg_power_info / rapl_power_unit > 0x41)
311                     return 32;
312             else
313                     return 16;
314     }
315     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu5RTlgzSxHNU8YEiZyg63VT4oV0wHomK1tUxgwyYstzK0M2Ed2Cv7gFreqR3FCBLpU-3DVg8s_3AAg4m2Qo6X8uGGmBm-2BJP2cELf0dkUfIv8-2BPwY7td4r9Jgz-2FXYe-2B7X4gdTCESXd679KQWQnL7MTJlQCe04ibt-2F-2BAqkhnBFuL9fipLXW-2FcOzqJ0RI1vYe-2FABWtFAaVM0fcpt3lpPYoKw1lwtgMe2rxbMPdHKm011M9JxGaF8nhGvZJMbf9Cz4ZoJp4dV0iVCGf9pIP7qsgmmtl4dlHgE4IQ-3D-3D

_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to