summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorMadalin Bucur <madalin.bucur@nxp.com>2016-11-16 15:40:14 +0100
committerScott Wood <oss@buserror.net>2016-11-23 08:23:38 +0100
commit02b7d2a833b007bae45be8d4adbae0f2a43d8dc4 (patch)
treea1b4560ffed5742c5f3b9c9a1416ccccdd39178f /drivers/soc
parentpowerpc/85xx: Enable gpio power/reset driver (diff)
downloadlinux-02b7d2a833b007bae45be8d4adbae0f2a43d8dc4.tar.xz
linux-02b7d2a833b007bae45be8d4adbae0f2a43d8dc4.zip
soc/qman: Check ioremap return value
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/fsl/qbman/qman_ccsr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soc/fsl/qbman/qman_ccsr.c b/drivers/soc/fsl/qbman/qman_ccsr.c
index 0cace9e0077e..f4e6e70de259 100644
--- a/drivers/soc/fsl/qbman/qman_ccsr.c
+++ b/drivers/soc/fsl/qbman/qman_ccsr.c
@@ -444,6 +444,9 @@ static int zero_priv_mem(struct device *dev, struct device_node *node,
/* map as cacheable, non-guarded */
void __iomem *tmpp = ioremap_prot(addr, sz, 0);
+ if (!tmpp)
+ return -ENOMEM;
+
memset_io(tmpp, 0, sz);
flush_dcache_range((unsigned long)tmpp,
(unsigned long)tmpp + sz);