[-next] ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure
diff mbox series

Message ID 20191025093905.14888-1-yuehaibing@huawei.com
State New
Headers show
Series
  • [-next] ALSA: intel_hdmi: Remove dev_err() on platform_get_irq() failure
Related show

Commit Message

YueHaibing Oct. 25, 2019, 9:39 a.m. UTC
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(-)

Comments

Takashi Iwai Oct. 25, 2019, 12:43 p.m. UTC | #1
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

Patch
diff mbox series

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) {