summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/fsl_lpuart.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-11-07 00:23:13 -0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-07 08:35:46 -0800
commit4ae612a3260336872e4f858d2d226a3721ccfd89 (patch)
treeac0fe35246017ad904a1623a02281b6220022d36 /drivers/tty/serial/fsl_lpuart.c
parentad5708f67e0f5aa78915715c660b4f2ca9130279 (diff)
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.c6
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;