]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: Intel: avs: Simplify dmi_match_quirk()
authorCezary Rojewski <cezary.rojewski@intel.com>
Wed, 27 Aug 2025 14:22:27 +0000 (16:22 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 28 Aug 2025 10:29:09 +0000 (12:29 +0200)
No functional changes, just code lines reduction.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Message-ID: <20250827142229.869139-4-cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/board_selection.c

index edf20d7816ead59b80ab22108d3387c84447afdd..4b0a8482af2ea1cfc8cd434ae66b408dcd541665 100644 (file)
@@ -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))