Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679096 > unrolled thread

[PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()

Started by"Gustavo A. R. Silva" <garsilva@embeddedor.com>
First post2017-06-30 22:00 +0200
Last post2017-06-30 22:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 22:00 +0200
    Re: [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe() Takashi Iwai <tiwai@suse.de> - 2017-06-30 22:10 +0200
      Re: [PATCH] ALSA: x86: fix error return code in  hdmi_lpe_audio_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 22:20 +0200

#1679096 — [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()

From"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date2017-06-30 22:00 +0200
Subject[PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
Message-ID<tYaf7-1dM-7@gated-at.bofh.it>
platform_get_irq() returns an error code, but the sata_rcar 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 and propagate the return value of platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 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

[toc] | [next] | [standalone]


#1679108

FromTakashi Iwai <tiwai@suse.de>
Date2017-06-30 22:10 +0200
Message-ID<tYaoN-1w3-15@gated-at.bofh.it>
In reply to#1679096
On Fri, 30 Jun 2017 21:59:01 +0200,
Gustavo A. R. Silva wrote:
> 
> platform_get_irq() returns an error code, but the sata_rcar driver
> ignores it and always returns -ENODEV.

Which driver?  A copy&paste error?


Takashi

> 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 and propagate the return value of platform_get_irq on failure.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  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
> 
> 

[toc] | [prev] | [next] | [standalone]


#1679113 — Re: [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()

From"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date2017-06-30 22:20 +0200
SubjectRe: [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
Message-ID<tYayt-1z6-9@gated-at.bofh.it>
In reply to#1679108
Hi Takashi,

Quoting Takashi Iwai <tiwai@suse.de>:

> On Fri, 30 Jun 2017 21:59:01 +0200,
> Gustavo A. R. Silva wrote:
>>
>> platform_get_irq() returns an error code, but the sata_rcar driver
>> ignores it and always returns -ENODEV.
>
> Which driver?  A copy&paste error?
>

Yep, I'm already working on v2 of this patch, which fix this error.  
I'll send it shortly.

Thanks
--
Gustavo A. R. Silva

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web