Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbdF3USq (ORCPT ); Fri, 30 Jun 2017 16:18:46 -0400 Received: from gateway34.websitewelcome.com ([192.185.148.194]:33690 "EHLO gateway34.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752526AbdF3USp (ORCPT ); Fri, 30 Jun 2017 16:18:45 -0400 Date: Fri, 30 Jun 2017 15:18:41 -0500 From: "Gustavo A. R. Silva" To: Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe() Message-ID: <20170630201841.GA8057@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630151244.Horde.nPNra38wHbiLkXMM9mTTsxB@gator4166.hostgator.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.192.143 X-Exim-ID: 1dR2NH-001Ll2-1d X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.192.143]:60262 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 8 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1108 Lines: 33 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 --- Changes in v2: Fix error in commit message. sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index c19efc9..a095150 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -1758,8 +1758,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); -- 2.5.0