[PATCH 4.4 78/78] ALSA: hda - Fix yet another i915 pointer leftover in error path

From: Greg Kroah-Hartman
Date: Fri Dec 22 2017 - 05:32:36 EST


4.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@xxxxxxx>

commit 97cc2ed27e5a168cf423f67c3bc7c6cc41d12f82 upstream.

The hdac_acomp object in hdac_i915.c is left as assigned even after
binding with i915 actually fails, and this leads to the WARN_ON() at
the next load of the module.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94736
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Cc: Kouta Okamoto <kouta.okamoto@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
sound/hda/hdac_i915.c | 1 +
1 file changed, 1 insertion(+)

--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -240,6 +240,7 @@ out_master_del:
out_err:
kfree(acomp);
bus->audio_component = NULL;
+ hdac_acomp = NULL;
dev_info(dev, "failed to add i915 component master (%d)\n", ret);

return ret;