summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-12-09 10:04:25 +0100
committerTakashi Iwai <tiwai@suse.de>2018-12-11 08:18:25 +0100
commit4f799e734094f09feaae89ee75982fac84742c56 (patch)
treed4721bd977f2f554273b432c0b4453989ee773fd /sound/pci
parentALSA: hda/intel: Properly free the display power at error path (diff)
downloadlinux-4f799e734094f09feaae89ee75982fac84742c56.tar.xz
linux-4f799e734094f09feaae89ee75982fac84742c56.zip
ALSA: hda: Make snd_hdac_display_power() void function
After the recent refactoring, snd_hdac_display_power() doesn't return any error, hence it can be defined to return void. This makes many error checks redundant and allows us to reduce them gracefully. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 5399d0180434..e784130ea4e0 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2216,12 +2216,7 @@ static int azx_probe_continue(struct azx *chip)
* this power. For other platforms, like Baytrail/Braswell, only the
* display codec needs the power and it can be released after probe.
*/
- err = display_power(chip, true);
- if (err < 0) {
- dev_err(chip->card->dev,
- "Cannot turn on display power on i915\n");
- goto i915_power_fail;
- }
+ display_power(chip, true);
err = azx_first_init(chip);
if (err < 0)
@@ -2271,8 +2266,6 @@ static int azx_probe_continue(struct azx *chip)
out_free:
if (err < 0 || !hda->need_i915_power)
display_power(chip, false);
-
-i915_power_fail:
if (err < 0)
hda->init_failed = 1;
complete_all(&hda->probe_wait);