Fixes error condition check when requesting the irq,
that would not trigger because of uart_port.irq being
defined as unsigned int.
Reported by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
/* get the interrupt */
- data->uart.port.irq = platform_get_irq(pdev, 0);
- if (data->uart.port.irq < 0) {
- dev_err(&pdev->dev, "irq not found - %i",
- data->uart.port.irq);
- return data->uart.port.irq;
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "irq not found - %i", ret);
+ return ret;
}
+ data->uart.port.irq = ret;
/* map the main registers */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);