aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSodhi, VunnyX <vunnyx.sodhi@intel.com>2016-10-28 07:29:41 -0400
committerMark Brown <broonie@kernel.org>2016-10-28 12:29:09 -0400
commit7a5857c3c282c12a8bd0cfd2dd4a17a9252c2b4d (patch)
tree9fdbc6cbca57a287f29fe93a59a321f06964492a
parent6d13f62d931ba638e54ba56f3a7dd3080ffb485a (diff)
ASoC: Intel: Skylake: Fix to turn off hdmi power on probe failure
HDMI codec is required to be powered up before controller initialization for successful enumeration of codec. If the probe fails it needs to be powered off to balance the power state of HDMI codec. This fix balances the reference count in the error path before turning off the codec. Reported-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/skylake/skl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 7b7a380b1245..3fc30cbe83c1 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -674,7 +674,7 @@ static int skl_probe(struct pci_dev *pci,
674 674
675 if (skl->nhlt == NULL) { 675 if (skl->nhlt == NULL) {
676 err = -ENODEV; 676 err = -ENODEV;
677 goto out_free; 677 goto out_display_power_off;
678 } 678 }
679 679
680 skl_nhlt_update_topology_bin(skl); 680 skl_nhlt_update_topology_bin(skl);
@@ -746,6 +746,9 @@ out_mach_free:
746 skl_machine_device_unregister(skl); 746 skl_machine_device_unregister(skl);
747out_nhlt_free: 747out_nhlt_free:
748 skl_nhlt_free(skl->nhlt); 748 skl_nhlt_free(skl->nhlt);
749out_display_power_off:
750 if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI))
751 snd_hdac_display_power(bus, false);
749out_free: 752out_free:
750 skl->init_failed = 1; 753 skl->init_failed = 1;
751 skl_free(ebus); 754 skl_free(ebus);