Skip to content

Commit

Permalink
ALSA: hda/intel: Properly free the display power at error path
Browse files Browse the repository at this point in the history
When an error occurs in azx_probe_continue(), we should release the
display power.  However, the current code ignores it and releases the
display power only for HSW/BDW cases.  Fix it.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Dec 11, 2018
1 parent e454ff8 commit 457f3c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,7 @@ static int azx_probe_continue(struct azx *chip)
pm_runtime_put_autosuspend(&pci->dev);

out_free:
if (!hda->need_i915_power)
if (err < 0 || !hda->need_i915_power)
display_power(chip, false);

i915_power_fail:
Expand Down

0 comments on commit 457f3c8

Please sign in to comment.