提交 e1a7d248 编写于 作者: M Martin Sperl 提交者: Greg Kroah-Hartman

serial: bcm2835: fix unsigned int issue with irq

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: NMartin Sperl <kernel@martin.sperl.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0ab556c2
...@@ -59,12 +59,12 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev) ...@@ -59,12 +59,12 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev)
} }
/* get the interrupt */ /* get the interrupt */
data->uart.port.irq = platform_get_irq(pdev, 0); ret = platform_get_irq(pdev, 0);
if (data->uart.port.irq < 0) { if (ret < 0) {
dev_err(&pdev->dev, "irq not found - %i", dev_err(&pdev->dev, "irq not found - %i", ret);
data->uart.port.irq); return ret;
return data->uart.port.irq;
} }
data->uart.port.irq = ret;
/* map the main registers */ /* map the main registers */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册