[d-kernel] [PATCH 2/6] ASoC: Intel: sof_es8336: added protection against dereference of the null pointer before calling the string comparison function.
nickel на altlinux.org
nickel на altlinux.org
Вт Авг 2 20:21:36 MSK 2022
From: Vasiliy Kovalev <kovalev at altlinux.org>
Signed-off-by: Vasiliy Kovalev <kovalev at altlinux.org>
---
sound/soc/intel/boards/sof_es8336.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 0eb8ab0081463..2e91de34018f9 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -233,7 +233,7 @@ static int sof_es8336_quirk_cb(const struct dmi_system_id *id)
if (quirk & SOF_ES8336_TGL_GPIO_QUIRK)
gpio_mapping = quirk_acpi_es8336_gpios;
- if (strcmp(id->ident, "pa-enable ACPI deviant") == 0) {
+ if (id->ident != NULL && strcmp(id->ident, "pa-enable ACPI deviant") == 0) {
if (quirk_pa_enable < 0) quirk_pa_enable = 1;
else quirk_pa_enable++;
}
--
2.33.3
Подробная информация о списке рассылки devel-kernel