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 1458232: Null pointer dereferences (REVERSE_INULL) /src/drivers/usb/acpi/usb_acpi.c: 130 in usb_acpi_get_pld()
________________________________________________________________________________________________________ *** CID 1458232: Null pointer dereferences (REVERSE_INULL) /src/drivers/usb/acpi/usb_acpi.c: 130 in usb_acpi_get_pld() 124 }; 125 126 bool usb_acpi_get_pld(const struct device *usb_device, struct acpi_pld *pld) 127 { 128 struct drivers_usb_acpi_config *config = usb_device->chip_info; 129
CID 1458232: Null pointer dereferences (REVERSE_INULL) Null-checking "usb_device" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
130 if (!usb_device || !usb_device->chip_info || 131 usb_device->chip_ops != &drivers_usb_acpi_ops) 132 return false; 133 134 if (config->use_custom_pld) 135 memcpy(pld, &config->custom_pld, sizeof(pld));
** CID 1458231: Incorrect expression (SIZEOF_MISMATCH) /src/drivers/usb/acpi/usb_acpi.c: 135 in usb_acpi_get_pld()
________________________________________________________________________________________________________ *** CID 1458231: Incorrect expression (SIZEOF_MISMATCH) /src/drivers/usb/acpi/usb_acpi.c: 135 in usb_acpi_get_pld() 129 130 if (!usb_device || !usb_device->chip_info || 131 usb_device->chip_ops != &drivers_usb_acpi_ops) 132 return false; 133 134 if (config->use_custom_pld)
CID 1458231: Incorrect expression (SIZEOF_MISMATCH) Passing argument "pld" of type "struct acpi_pld *" and argument "4UL /* sizeof (pld) */" to function "memcpy" is suspicious.
135 memcpy(pld, &config->custom_pld, sizeof(pld)); 136 else 137 acpi_pld_fill_usb(pld, config->type, &config->group); 138 139 return true;
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0...