Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ae612a3 authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman
Browse files

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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarJingchang Lu <jingchang.lu@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ad5708f6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;