Commit 99c932c2 authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

serial: mxs-auart: Check for platform_get_irq() error

We should check whether platform_get_irq() failed, and in the case of error
this needs to be propagated.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6960cd46
...@@ -1265,6 +1265,9 @@ static int mxs_auart_probe(struct platform_device *pdev) ...@@ -1265,6 +1265,9 @@ static int mxs_auart_probe(struct platform_device *pdev)
s->mctrl_prev = 0; s->mctrl_prev = 0;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
s->port.irq = irq; s->port.irq = irq;
ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0, ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0,
dev_name(&pdev->dev), s); dev_name(&pdev->dev), s);
......
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