1
0
Fork 0
alistair23-linux/arch/mips/loongson64/loongson-3
Tiezhu Yang c09d0bd924 MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init()
[ Upstream commit 72d052e28d ]

If kzalloc fails, it should return -ENOMEM, otherwise may trigger a NULL
pointer dereference.

Fixes: 3adeb2566b ("MIPS: Loongson: Improve LEFI firmware interface")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:36:27 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
acpi_init.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cop2-ex.c MIPS: Simplify FP context initialization 2018-11-09 10:23:13 -08:00
dma.c MIPS: loongson: untangle dma implementations 2018-06-24 09:26:04 -07:00
hpet.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.c MIPS: Loongson-3: Fix BRIDGE irq delivery problem 2018-10-15 23:11:14 -07:00
numa.c MIPS: Loongson64: Fix boot failure after dropping boot_mem_map 2019-09-30 15:18:22 -07:00
platform.c MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() 2020-02-24 08:36:27 +01:00
smp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
smp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00