summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2025-08-27 16:22:27 +0200
committerMark Brown <broonie@kernel.org>2025-08-28 12:29:09 +0200
commita44281b8b58a88ca3020c89fd697fc1cd18a31b4 (patch)
tree362465d22abaf858cf778e8b518c089ffc428d2a
parent6acfaee44cbe9364a91dcc373fb4e6e395c5b20b (diff)
ASoC: Intel: avs: Simplify dmi_match_quirk()
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>
-rw-r--r--sound/soc/intel/avs/board_selection.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/soc/intel/avs/board_selection.c b/sound/soc/intel/avs/board_selection.c
index edf20d7816ea..4b0a8482af2e 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))