From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 10 Feb 2011 16:39:20 +0000 (+0100)
Subject: ALSA: hda - Don't handle empty patch files
X-Git-Tag: firefly_0821_release~7613^2~2297^2~22
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=41a63f18d339ae6aefe73d45a8147f63f3439b30;p=firefly-linux-kernel-4.4.55.git

ALSA: hda - Don't handle empty patch files

When an empty string is passed to patch option, the driver should
ignore it.  Otherwise it gets an error by trying to load it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 2e91a991eb15..0baffcdee8f9 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2703,7 +2703,7 @@ static int __devinit azx_probe(struct pci_dev *pci,
 	if (err < 0)
 		goto out_free;
 #ifdef CONFIG_SND_HDA_PATCH_LOADER
-	if (patch[dev]) {
+	if (patch[dev] && *patch[dev]) {
 		snd_printk(KERN_ERR SFX "Applying patch firmware '%s'\n",
 			   patch[dev]);
 		err = snd_hda_load_patch(chip->bus, patch[dev]);