[linux-yocto] [PATCH] Fix crash bug when skl_probe fail

Guoqing Zhang guoqing.zhang at intel.com
Wed Jan 11 05:37:02 PST 2017


The skl_free expects no display is powered on when called. The fix
makes sure the display is powered off before calling it

Signed-off-by: Guoqing Zhang <guoqing.zhang at intel.com>
---
 sound/soc/intel/skylake/skl.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 55278b5..79ae13a 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -752,6 +752,14 @@ out_nhlt_free:
 	skl_nhlt_free(skl->nhlt);
 out_free:
 	skl->init_failed = 1;
+	 
+	if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
+		// make sure display is powered off before
+		// calling skl_free
+		if (bus->i915_power_refcount > 0)
+			snd_hdac_display_power(bus, false);
+	}
+
 	skl_free(ebus);
 
 	return err;
-- 
2.5.0



More information about the linux-yocto mailing list