diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2023-11-22 14:46:36 +0800 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2023-12-06 13:24:26 +0800 |
commit | 1c2b1049af3f86545fcc5fae0fc725fb64b3a09e (patch) | |
tree | 98344b1e3c77dcd1a405501462e389ee1a1047d5 /kernel/ucount.c | |
parent | 8ae06f1366390972fdcce0f0cee3cac0f63b3209 (diff) | |
download | linux-stable-1c2b1049af3f86545fcc5fae0fc725fb64b3a09e.tar.gz linux-stable-1c2b1049af3f86545fcc5fae0fc725fb64b3a09e.tar.bz2 linux-stable-1c2b1049af3f86545fcc5fae0fc725fb64b3a09e.zip |
ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
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: e76bdfd7403a ("ARM: imx: Added perf functionality to mmdc driver")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'kernel/ucount.c')
0 files changed, 0 insertions, 0 deletions