summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-31 08:47:48 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-16 08:32:09 +0200
commit9d518ba397712add7fa06ff3ab056a26a3c46de6 (patch)
treeda8fbe4537c39f433b6868b7733bbc2e34250378 /drivers/misc
parentdde56d42ad1763dd81a3de65b74d7387d12f6fa9 (diff)
downloadbarebox-9d518ba397712add7fa06ff3ab056a26a3c46de6.tar.gz
resource: Let dev_get_resource return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/sram.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index 0466a15..c89fe87 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -48,6 +48,8 @@ static int sram_probe(struct device_d *dev)
cdev_find_free_index("sram"));
res = dev_get_resource(dev, IORESOURCE_MEM, 0);
+ if (IS_ERR(res))
+ return PTR_ERR(res);
sram->cdev.size = (unsigned long)resource_size(res);
sram->cdev.ops = &memops;