From a44281b8b58a88ca3020c89fd697fc1cd18a31b4 Mon Sep 17 00:00:00 2001 From: Cezary Rojewski Date: Wed, 27 Aug 2025 16:22:27 +0200 Subject: [PATCH] ASoC: Intel: avs: Simplify dmi_match_quirk() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit No functional changes, just code lines reduction. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Message-ID: <20250827142229.869139-4-cezary.rojewski@intel.com> Signed-off-by: Mark Brown --- sound/soc/intel/avs/board_selection.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sound/soc/intel/avs/board_selection.c b/sound/soc/intel/avs/board_selection.c index edf20d7816ead..4b0a8482af2ea 100644 --- a/sound/soc/intel/avs/board_selection.c +++ b/sound/soc/intel/avs/board_selection.c @@ -58,19 +58,13 @@ static const struct dmi_system_id kblr_dmi_table[] = { static struct snd_soc_acpi_mach *dmi_match_quirk(void *arg) { struct snd_soc_acpi_mach *mach = arg; - const struct dmi_system_id *dmi_id; struct dmi_system_id *dmi_table; - if (mach->quirk_data == NULL) - return mach; - dmi_table = (struct dmi_system_id *)mach->quirk_data; - dmi_id = dmi_first_match(dmi_table); - if (!dmi_id) - return NULL; - - return mach; + if (!dmi_table || dmi_first_match(dmi_table)) + return mach; + return NULL; } #define AVS_SSP(x) (BIT(x)) -- 2.47.3