acrn-kernel/arch/arm/mach-imx
Kunwu Chan 12ac3b0ab8 ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
[ Upstream commit 1c2b1049af3f86545fcc5fae0fc725fb64b3a09e ]

devm_kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful
by checking the pointer validity.

Release the id allocated in 'mmdc_pmu_init' when 'devm_kasprintf'
return NULL

Suggested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Fixes: e76bdfd740 ("ARM: imx: Added perf functionality to mmdc driver")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:39:16 +01:00
..
Kconfig
Makefile
anatop.c
avic.c
common.h
cpu-imx5.c
cpu-imx25.c
cpu-imx27.c
cpu-imx31.c
cpu-imx35.c
cpu.c
cpuidle-imx5.c
cpuidle-imx6q.c
cpuidle-imx6sl.c
cpuidle-imx6sx.c
cpuidle-imx7ulp.c
cpuidle.h
crmregs-imx3.h
gpc.c
hardware.h
headsmp.S
hotplug.c
iim.h
irq-common.c
irq-common.h
mach-imx1.c
mach-imx6q.c
mach-imx6sl.c
mach-imx6sx.c
mach-imx6ul.c
mach-imx7d-cm4.c
mach-imx7d.c
mach-imx7ulp.c
mach-imx25.c
mach-imx27.c
mach-imx31.c
mach-imx35.c
mach-imx50.c
mach-imx51.c
mach-imx53.c
mach-imxrt.c
mach-ls1021a.c
mach-vf610.c
mm-imx3.c
mmdc.c
mx2x.h
mx3x.h
mx27.h
mx31.h
mx35.h
mxc.h
platsmp.c
pm-imx5.c
pm-imx6.c
pm-imx7ulp.c
pm-imx25.c
pm-imx27.c
resume-imx6.S
src.c
ssi-fiq-ksym.c
ssi-fiq.S
suspend-imx6.S
suspend-imx53.S
system.c
tzic.c