diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-02-22 09:31:02 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2016-02-26 17:43:48 +0100 |
commit | 302cff1a16b0759708e131a2540c6342e9095803 (patch) | |
tree | 35e2d280c300854785a60090d404167e854f4118 /arch/arm/mach-ux500 | |
parent | 6ad7313b534b1bdef09a07d4baad54e8d93e8480 (diff) |
ARM: ux500: fix ureachable iounmap()
The code was executing a return with a pointer before reaching
iounmap().
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index a0ffaad1fb61..a557955472ea 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -76,17 +76,19 @@ static struct arm_pmu_platdata db8500_pmu_platdata = { static const char *db8500_read_soc_id(void) { void __iomem *uid; + const char *retstr; uid = ioremap(U8500_BB_UID_BASE, 0x20); if (!uid) return NULL; /* Throw these device-specific numbers into the entropy pool */ add_device_randomness(uid, 0x14); - return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", + retstr = kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", readl((u32 *)uid+0), readl((u32 *)uid+1), readl((u32 *)uid+2), readl((u32 *)uid+3), readl((u32 *)uid+4)); iounmap(uid); + return retstr; } static struct device * __init db8500_soc_device_init(void) |