summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/driver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 3be4b99..81cedca 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -262,6 +262,8 @@ void __iomem *dev_request_mem_region(struct device_d *dev, int num)
return NULL;
res = request_iomem_region(dev_name(dev), res->start, res->size);
+ if (!res)
+ return NULL;
return (void __force __iomem *)res->start;
}