From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 From: nickel@altlinux.org To: devel-kernel@lists.altlinux.org Date: Tue, 2 Aug 2022 20:21:36 +0300 Message-Id: <20220802172140.226880-3-nickel@altlinux.org> X-Mailer: git-send-email 2.33.3 In-Reply-To: <20220802172140.226880-1-nickel@altlinux.org> References: <20220802172140.226880-1-nickel@altlinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Vasiliy Kovalev Subject: [d-kernel] [PATCH 2/6] ASoC: Intel: sof_es8336: added protection against dereference of the null pointer before calling the string comparison function. X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 17:22:46 -0000 Archived-At: List-Archive: List-Post: From: Vasiliy Kovalev Signed-off-by: Vasiliy Kovalev --- 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