Skip to content

Commit d20c0da

Browse files
bebarinomfischer
authored andcommitted
fpga: Remove dev_err() usage after platform_get_irq()
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: Moritz Fischer <mdf@kernel.org> Cc: linux-fpga@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Moritz Fischer <mdf@kernel.org>
1 parent 54ecb8f commit d20c0da

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/fpga/zynq-fpga.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,8 @@ static int zynq_fpga_probe(struct platform_device *pdev)
578578
init_completion(&priv->dma_done);
579579

580580
priv->irq = platform_get_irq(pdev, 0);
581-
if (priv->irq < 0) {
582-
dev_err(dev, "No IRQ available\n");
581+
if (priv->irq < 0)
583582
return priv->irq;
584-
}
585583

586584
priv->clk = devm_clk_get(dev, "ref_clk");
587585
if (IS_ERR(priv->clk)) {

0 commit comments

Comments
 (0)