diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2023-11-22 09:46:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-13 20:45:18 +0300 |
commit | 12deaef0c8670064022819ef346ad05a692f5c69 (patch) | |
tree | 17abbf9b28706c9ec122f8dc9b4b728f564d8ad0 /arch/arm64/boot | |
parent | 3836f1f246e276d8ba296b28ec92c5764b2f3776 (diff) | |
download | linux-12deaef0c8670064022819ef346ad05a692f5c69.tar.xz |
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/arm64/boot')
0 files changed, 0 insertions, 0 deletions