summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/liteuart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/liteuart.c')
-rw-r--r--drivers/tty/serial/liteuart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
index 64842f3539e1..0b06770642cb 100644
--- a/drivers/tty/serial/liteuart.c
+++ b/drivers/tty/serial/liteuart.c
@@ -270,8 +270,8 @@ static int liteuart_probe(struct platform_device *pdev)
/* get membase */
port->membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
- if (!port->membase)
- return -ENXIO;
+ if (IS_ERR(port->membase))
+ return PTR_ERR(port->membase);
/* values not from device tree */
port->dev = &pdev->dev;