Skip to contentSkip to conversation

ASoC: detect empty DMI strings

PATCH In review Casey Connolly 2 participants 2 messages Mar 6 – Mar 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: detect empty DMI strings

Some bootloaders like recent versions of U-Boot may install some DMI properties with empty values rather than not populate them. This manages to make its way through the validator and cleanup resulting in a rogue hyphen being appended to the card longname.

Fixes 4e01e5dbba96 ("ASoC: improve the DMI long card code in asoc-core")
---
 sound/soc/soc-core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/soc-core.c +4 -1
index 9dd84d73046b..ba5c60f64208 100644
@@ -1860,14 +1860,17 @@ static void cleanup_dmi_name(char *name)
 }
 
 /*
  * Check if a DMI field is valid, i.e. not containing any string
- * in the black list.
+ * in the black list and not the empty string.
  */
 static int is_dmi_valid(const char *field)
 {
 	int i = 0;
 
+	if (!field[0])
+		return 0;
+
 	while (dmi_blacklist[i]) {
 		if (strstr(field, dmi_blacklist[i]))
 			return 0;
 		i++;
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 1 line · Casey Connolly

ASoC: detect empty DMI strings

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.0

Thanks!

[1/1] ASoC: detect empty DMI strings

      https://git.kernel.org/broonie/misc/c/a9683730e8b1

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark