forked from Minki/linux
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>
This commit is contained in:
parent
ad5708f67e
commit
4ae612a326
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user