We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch.
// <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Jaroslav Kysela <pe...@perex.cz> Cc: Takashi Iwai <ti...@suse.com> Cc: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Thomas Gleixner <t...@linutronix.de> Cc: "Ville Syrjälä" <ville.syrj...@linux.intel.com> Cc: Colin Ian King <colin.k...@canonical.com> Cc: alsa-de...@alsa-project.org Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Stephen Boyd <swb...@chromium.org> --- Please apply directly to subsystem trees 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 5fd4e32247a6..cd389d21219a 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) { -- Sent by a computer through tubes