serial: 8250_dw: Avoid double error messaging when IRQ absent
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Oct 2019 10:35:58 +0000 (13:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:42:25 +0000 (08:42 +0100)
commit 05faa64e73924556ba281911db24643e438fe7ba upstream.

Since the commit 7723f4c5ecdb ("driver core: platform: Add an error message
to platform_get_irq*()") platform_get_irq() started issuing an error message.
Thus, there is no need to have the same in the driver

Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191023103558.51862-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c

index 1c72fdc..51a7d3b 100644 (file)
@@ -386,10 +386,10 @@ static int dw8250_probe(struct platform_device *pdev)
 {
        struct uart_8250_port uart = {}, *up = &uart;
        struct resource *regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       int irq = platform_get_irq(pdev, 0);
        struct uart_port *p = &up->port;
        struct device *dev = &pdev->dev;
        struct dw8250_data *data;
+       int irq;
        int err;
        u32 val;
 
@@ -398,11 +398,9 @@ static int dw8250_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       if (irq < 0) {
-               if (irq != -EPROBE_DEFER)
-                       dev_err(dev, "cannot get irq\n");
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0)
                return irq;
-       }
 
        spin_lock_init(&p->lock);
        p->mapbase      = regs->start;