Skip to content

Commit

Permalink
ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
Browse files Browse the repository at this point in the history
platform_get_irq() returns an error code, but the intel_hdmi_audio
driver ignores it and always returns -ENODEV. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly. Also,
notice that platform_get_irq() no longer returns 0 on error.

Print error message and propagate the return value of platform_get_irq
on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
GustavoARSilva authored and tiwai committed Jun 30, 2017
1 parent 0a6f060 commit 1967158
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/x86/intel_hdmi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,8 +1699,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
/* get resources */
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(&pdev->dev, "Could not get irq resource\n");
return -ENODEV;
dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
return irq;
}

res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down

0 comments on commit 1967158

Please sign in to comment.