summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/syscon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/syscon.c')
-rw-r--r--drivers/mfd/syscon.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 55cc34ff56..9589a03f16 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -71,15 +71,15 @@ static int syscon_probe(struct device_d *dev)
return -ENOMEM;
res = dev_get_resource(dev, IORESOURCE_MEM, 0);
- if (!res) {
+ if (IS_ERR(res)) {
free(syscon);
- return -ENOENT;
+ return PTR_ERR(res);
}
res = request_iomem_region(dev_name(dev), res->start, res->end);
- if (!res) {
+ if (IS_ERR(res)) {
free(syscon);
- return -EBUSY;
+ return PTR_ERR(res);
}
syscon->base = (void __iomem *)res->start;