ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
PATCH 1/1 ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
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.
--- sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/x86/intel_hdmi_audio.c +2 -2
@@ -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 );
Signature · 1 line
2.5.0
Quoted 3 lines · Gustavo A. R. Silva
platform_get_irq()returns an error code, but thesata_rcardriver ignores it and always returns-ENODEV.
Which driver? A copy&paste error?
Takashi
Quoted 30 lines
This is not correct, and
prevents -EPROBE_DEFER from being propagated properly. Also, notice thatplatform_get_irq()no longer returns 0 on error.Print and propagate the return value of
platform_get_irqon failure.Signed-off-by Gustavo A. R. Silva <[email protected]>--- sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)sound/x86/intel_hdmi_audio.c +2
-2@@ -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 );Signature · 1 line
2.5.0
Hi Takashi,
Quoting Takashi Iwai <[email protected]>:
Quoted 8 lines
Quoted 3 lines · Gustavo A. R. Silva
platform_get_irq()returns an error code, but thesata_rcardriver 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
PATCH v2 1/1 ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
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.
---
Changes in v2:
Fix error in commit message.
sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/x86/intel_hdmi_audio.c +2 -2
@@ -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 );
Signature · 1 line
2.5.0
Quoted 3 lines · Gustavo A. R. Silva
Also,
notice thatplatform_get_irq()no longer returns 0 on error.
There is no change by your patch in this regard, right?
Takashi
Quoted 30 lines
Print error message and propagate the return value of
platform_get_irqon failure.Signed-off-by Gustavo A. R. Silva <[email protected]>---
Changes in v2:
Fix error in commit message.sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)sound/x86/intel_hdmi_audio.c +2
-2@@ -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 );Signature · 1 line
2.5.0
Hi Takashi,
Quoting Takashi Iwai <[email protected]>:
Quoted 8 lines
Quoted 3 lines · Gustavo A. R. Silva
Also,
notice thatplatform_get_irq()no longer returns 0 on error.There is no change by your patch in this regard, right?
You are correct. I just pointing it out. This is the commit that changed the platform_get_irq code:
Quoted 29 lines
Takashi
Quoted 26 lines
Print error message and propagate the return value of
platform_get_irqon failure.Signed-off-by Gustavo A. R. Silva <[email protected]>---
Changes in v2:
Fix error in commit message.sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)sound/x86/intel_hdmi_audio.c +2
-2@@ -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; }
Quoted 5 lines
Quoted 5 lines
res_mmio=platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
2.5.0
Thanks
--
Gustavo A. R. Silva
Quoted 11 lines · Gustavo A. R. Silva
Hi Takashi,
Quoting Takashi Iwai <[email protected]>:
Quoted 6 lines
Quoted 3 lines · Gustavo A. R. Silva
Also,
notice thatplatform_get_irq()no longer returns 0 on error.
Quoted 7 lines
Quoted 2 lines
There is no change by your patch in this regard, right?
You are correct. I just pointing it out. This is the commit that changed the
platform_get_irqcode:
OK, applied now to for-next branch.
Thanks.
Takashi
Quoting Takashi Iwai <[email protected]>:
Quoted 16 lines
Quoted 14 lines · Gustavo A. R. Silva
Hi Takashi,
Quoting Takashi Iwai <[email protected]>:
Quoted 8 lines
Quoted 3 lines · Gustavo A. R. Silva
Also,
notice thatplatform_get_irq()no longer returns 0 on error.There is no change by your patch in this regard, right?
Quoted 8 lines
Quoted 4 lines
You are correct. I just pointing it out. This is the commit that changed the
platform_get_irqcode:OK, applied now to for-next branch.
Thanks.
Great :)
Thank you
--
Gustavo A. R. Silva