Skip to content

Commit

Permalink
serial: mxs-auart: Check for platform_get_irq() error
Browse files Browse the repository at this point in the history
We should check whether platform_get_irq() failed, and in the case of error
this needs to be propagated.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Fabio Estevam authored and Greg Kroah-Hartman committed Feb 2, 2015
1 parent 6960cd4 commit 99c932c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/tty/serial/mxs-auart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,9 @@ static int mxs_auart_probe(struct platform_device *pdev)
s->mctrl_prev = 0;

irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;

s->port.irq = irq;
ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0,
dev_name(&pdev->dev), s);
Expand Down

0 comments on commit 99c932c

Please sign in to comment.