diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2015-01-14 11:39:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 13:11:25 -0500 |
commit | 99c932c26d61f2c225f8f8e00dbea404646b9166 (patch) | |
tree | b3046a8555ebc0393801d4b3c341996217d77be5 | |
parent | 6960cd465e553c8c0f9c26663b32bf3f3cd6a298 (diff) |
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: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 767fddaa7576..b54b6a2a5774 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c | |||
@@ -1265,6 +1265,9 @@ static int mxs_auart_probe(struct platform_device *pdev) | |||
1265 | s->mctrl_prev = 0; | 1265 | s->mctrl_prev = 0; |
1266 | 1266 | ||
1267 | irq = platform_get_irq(pdev, 0); | 1267 | irq = platform_get_irq(pdev, 0); |
1268 | if (irq < 0) | ||
1269 | return irq; | ||
1270 | |||
1268 | s->port.irq = irq; | 1271 | s->port.irq = irq; |
1269 | ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0, | 1272 | ret = devm_request_irq(&pdev->dev, irq, mxs_auart_irq_handle, 0, |
1270 | dev_name(&pdev->dev), s); | 1273 | dev_name(&pdev->dev), s); |