From 4f799e734094f09feaae89ee75982fac84742c56 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 9 Dec 2018 10:04:25 +0100 Subject: 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 --- sound/pci/hda/hda_intel.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'sound/pci') 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); -- cgit v1.2.3