Skip to content

Commit

Permalink
ASoC: Intel: Skylake: Fix to turn off hdmi power on probe failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sodhi, VunnyX authored and Mark Brown committed Oct 28, 2016
1 parent 6d13f62 commit 7a5857c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/intel/skylake/skl.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ static int skl_probe(struct pci_dev *pci,

if (skl->nhlt == NULL) {
err = -ENODEV;
goto out_free;
goto out_display_power_off;
}

skl_nhlt_update_topology_bin(skl);
Expand Down Expand Up @@ -746,6 +746,9 @@ static int skl_probe(struct pci_dev *pci,
skl_machine_device_unregister(skl);
out_nhlt_free:
skl_nhlt_free(skl->nhlt);
out_display_power_off:
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI))
snd_hdac_display_power(bus, false);
out_free:
skl->init_failed = 1;
skl_free(ebus);
Expand Down

0 comments on commit 7a5857c

Please sign in to comment.