summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/digic.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-31 10:38:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-16 08:32:10 +0200
commited6e965824303255cacc1c1a195d3684caa26bce (patch)
tree26e2b1b78498675ceae4dd2e990836c26ec1d5ec /drivers/clocksource/digic.c
parent5bdc82c54a3306f2ae151a00f2df54f9240395b8 (diff)
downloadbarebox-ed6e965824303255cacc1c1a195d3684caa26bce.tar.gz
barebox-ed6e965824303255cacc1c1a195d3684caa26bce.tar.xz
resource: Let dev_request_mem_region return an error pointer
For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/clocksource/digic.c')
-rw-r--r--drivers/clocksource/digic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clocksource/digic.c b/drivers/clocksource/digic.c
index b80ef6f6fa..277bb02b63 100644
--- a/drivers/clocksource/digic.c
+++ b/drivers/clocksource/digic.c
@@ -19,6 +19,7 @@
#include <io.h>
#include <init.h>
#include <clock.h>
+#include <linux/err.h>
#define DIGIC_TIMER_CLOCK 1000000
@@ -44,9 +45,9 @@ static int digic_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);
}
clocks_calc_mult_shift(&digic_cs.mult, &digic_cs.shift,