summaryrefslogtreecommitdiffstats
path: root/drivers/clk/mvebu/common.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/clk/mvebu/common.c
parent5bdc82c54a3306f2ae151a00f2df54f9240395b8 (diff)
downloadbarebox-ed6e965824303255cacc1c1a195d3684caa26bce.tar.gz
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/clk/mvebu/common.c')
-rw-r--r--drivers/clk/mvebu/common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clk/mvebu/common.c b/drivers/clk/mvebu/common.c
index f3be5f2..0e7f65c 100644
--- a/drivers/clk/mvebu/common.c
+++ b/drivers/clk/mvebu/common.c
@@ -15,6 +15,7 @@
#include <init.h>
#include <of.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <linux/clkdev.h>
#include "common.h"
@@ -166,8 +167,8 @@ int mvebu_clk_gating_probe(struct device_d *dev)
desc = (const struct clk_gating_soc_desc *)match->data;
base = dev_request_mem_region(dev, 0);
- if (!base)
- return -EINVAL;
+ if (IS_ERR(base))
+ return PTR_ERR(base);
clk = of_clk_get(np, 0);
if (IS_ERR(clk))