summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/uemd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clocksource/uemd.c')
-rw-r--r--drivers/clocksource/uemd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clocksource/uemd.c b/drivers/clocksource/uemd.c
index 2ea455edfa..6c37de5bed 100644
--- a/drivers/clocksource/uemd.c
+++ b/drivers/clocksource/uemd.c
@@ -24,6 +24,7 @@
#include <init.h>
#include <linux/bitops.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <clock.h>
#define TIMER_LOAD 0x00
@@ -73,9 +74,9 @@ static int uemd_timer_probe(struct device_d *dev)
return -EBUSY;
timer_base = dev_request_mem_region(dev, 0);
- if (!timer_base) {
+ if (IS_ERR(timer_base)) {
dev_err(dev, "could not get memory region\n");
- return -ENODEV;
+ return PTR_ERR(timer_base);
}
timer_clk = clk_get(dev, NULL);