usb: gadget: xudc: Remove redundant platform_get_irq error message
authorYueHaibing <yuehaibing@huawei.com>
Thu, 16 Jan 2020 14:14:33 +0000 (22:14 +0800)
committerFelipe Balbi <balbi@kernel.org>
Sun, 15 Mar 2020 09:06:39 +0000 (11:06 +0200)
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.

Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/udc/tegra-xudc.c

index 634c2c1..fc1eafc 100644 (file)
@@ -3492,11 +3492,8 @@ static int tegra_xudc_probe(struct platform_device *pdev)
        }
 
        xudc->irq = platform_get_irq(pdev, 0);
-       if (xudc->irq < 0) {
-               dev_err(xudc->dev, "failed to get IRQ: %d\n",
-                               xudc->irq);
+       if (xudc->irq < 0)
                return xudc->irq;
-       }
 
        err = devm_request_irq(&pdev->dev, xudc->irq, tegra_xudc_irq, 0,
                               dev_name(&pdev->dev), xudc);