drivers/amd/i2s_machine_dev: return if scope is NULL
Avoid dereferencing a null pointer. Found-by: Coverity CID 1430549 BUG=None TEST=Build Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: I53f6a38aac6e7f94c3c370996b3b82ca0d88dac4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44001 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
6880aec670
commit
114cf22e8d
1 changed files with 5 additions and 0 deletions
|
@ -21,6 +21,11 @@ static void i2s_machine_dev_fill_ssdt(const struct device *dev)
|
|||
|
||||
dmic_select_gpio = &cfg->dmic_select_gpio;
|
||||
|
||||
if (scope == NULL) {
|
||||
printk(BIOS_ERR, "%s: ERROR: ACPI I2S scope not found\n", dev_path(dev));
|
||||
return;
|
||||
}
|
||||
|
||||
if (cfg->hid == NULL) {
|
||||
printk(BIOS_ERR, "%s: ERROR: HID required\n", dev_path(dev));
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue