diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-11-07 05:23:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 19:35:46 +0300 |
commit | 4ae612a3260336872e4f858d2d226a3721ccfd89 (patch) | |
tree | ac0fe35246017ad904a1623a02281b6220022d36 /drivers/tty/serial/fsl_lpuart.c | |
parent | ad5708f67e0f5aa78915715c660b4f2ca9130279 (diff) | |
download | linux-4ae612a3260336872e4f858d2d226a3721ccfd89.tar.xz |
serial: fsl_lpuart: Remove unneeded check for 'res'
'res' will be automatically checked inside devm_ioremap_resource(), so there is
no need to explicitly perform a NULL check.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jingchang Lu <jingchang.lu@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/fsl_lpuart.c')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 4e2577249ac5..73d939c0825a 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1786,15 +1786,13 @@ static int lpuart_probe(struct platform_device *pdev) } sport->port.line = ret; sport->lpuart32 = of_device_is_compatible(np, "fsl,ls1021a-lpuart"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - sport->port.mapbase = res->start; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sport->port.membase = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(sport->port.membase)) return PTR_ERR(sport->port.membase); + sport->port.mapbase = res->start; sport->port.dev = &pdev->dev; sport->port.type = PORT_LPUART; sport->port.iotype = UPIO_MEM; |