From: Fabio Estevam Date: Wed, 14 Jan 2015 16:39:08 +0000 (-0200) Subject: serial: mxs-auart: Check for platform_get_irq() error X-Git-Tag: v4.0-rc1~81^2~45 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=99c932c26d61f2c225f8f8e00dbea404646b9166;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- 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) 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);