Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH -next] ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure
@ 2019-10-25  9:39 YueHaibing
  2019-10-25 12:43 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-10-25  9:39 UTC (permalink / raw)
  To: perex, tiwai, ville.syrjala, chris, allison, alexios.zavras,
	yuehaibing, tglx
  Cc: alsa-devel, linux-kernel

platform_get_irq() will call dev_err() itself on failure,
so there is no need for the driver to also do this.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/x86/intel_hdmi_audio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index 5fd4e32..cd389d2 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1708,10 +1708,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: %d\n", irq);
+	if (irq < 0)
 		return irq;
-	}
 
 	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res_mmio) {
-- 
2.7.4


_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [alsa-devel] [PATCH -next] ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure
  2019-10-25  9:39 [alsa-devel] [PATCH -next] ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure YueHaibing
@ 2019-10-25 12:43 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-10-25 12:43 UTC (permalink / raw)
  To: YueHaibing
  Cc: alsa-devel, linux-kernel, tiwai, chris, alexios.zavras,
	ville.syrjala, tglx, allison

On Fri, 25 Oct 2019 11:39:05 +0200,
YueHaibing wrote:
> 
> platform_get_irq() will call dev_err() itself on failure,
> so there is no need for the driver to also do this.
> This is detected by coccinelle.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thanks.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-25 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-25  9:39 [alsa-devel] [PATCH -next] ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure YueHaibing
2019-10-25 12:43 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox