Commit aa49d8e8 authored by Anson Huang's avatar Anson Huang Committed by Greg Kroah-Hartman

tty: serial: imx: Add return value check for platform_get_irq()

RX irq is required, so add return value check for platform_get_irq().
Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
Link: https://lore.kernel.org/r/1589180996-618-1-git-send-email-Anson.Huang@nxp.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 24637007
...@@ -2252,6 +2252,8 @@ static int imx_uart_probe(struct platform_device *pdev) ...@@ -2252,6 +2252,8 @@ static int imx_uart_probe(struct platform_device *pdev)
return PTR_ERR(base); return PTR_ERR(base);
rxirq = platform_get_irq(pdev, 0); rxirq = platform_get_irq(pdev, 0);
if (rxirq < 0)
return rxirq;
txirq = platform_get_irq_optional(pdev, 1); txirq = platform_get_irq_optional(pdev, 1);
rtsirq = platform_get_irq_optional(pdev, 2); rtsirq = platform_get_irq_optional(pdev, 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment