From: Stephen Boyd Subject: [PATCH v6 57/57] ALSA: x86: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:57 -0700 Message-ID: <20190730181557.90391-58-swboyd@chromium.org> References: <20190730181557.90391-1-swboyd@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20190730181557.90391-1-swboyd@chromium.org> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: Jaroslav Kysela , Takashi Iwai , Chris Wilson , Greg Kroah-Hartman , Thomas Gleixner , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Colin Ian King , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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. // @@ 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(...); ) ... } // While we're here, remove braces on if statements that only have one statement (manually). Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Chris Wilson Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: "Ville Syrjälä" Cc: Colin Ian King Cc: alsa-devel@alsa-project.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- 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