From: Madalin Bucur Date: Wed, 16 Nov 2016 14:40:14 +0000 (+0200) Subject: soc/qman: Check ioremap return value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02b7d2a833b007bae45be8d4adbae0f2a43d8dc4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git soc/qman: Check ioremap return value Signed-off-by: Madalin Bucur Signed-off-by: Claudiu Manoil Signed-off-by: Scott Wood --- 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);