Skip to content

Commit

Permalink
serial: 8250_dw: Avoid double error messaging when IRQ absent
Browse files Browse the repository at this point in the history
Since the commit 7723f4c ("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: 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: stable <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
andy-shev authored and gregkh committed Nov 4, 2019
1 parent b027ce2 commit 05faa64
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/tty/serial/8250/8250_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,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;

Expand All @@ -397,11 +397,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;
Expand Down

0 comments on commit 05faa64

Please sign in to comment.