summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-aspeed.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-aspeed.c')
-rw-r--r--drivers/gpio/gpio-aspeed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index 9f7266e05f0a..8aa340677f65 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -413,8 +413,8 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev)
return -ENXIO;
gpio->base = devm_ioremap_resource(&pdev->dev, res);
- if (!gpio->base)
- return -ENOMEM;
+ if (IS_ERR(gpio->base))
+ return PTR_ERR(gpio->base);
spin_lock_init(&gpio->lock);