diff options
| author | longlong yan <yanlonglong@kylinos.cn> | 2026-07-14 14:51:32 +0800 |
|---|---|---|
| committer | Brian Masney <bmasney@redhat.com> | 2026-07-28 11:25:29 -0400 |
| commit | 18e9d14cbac33db1c1fb933c26a736eef53dd538 (patch) | |
| tree | 40ce08457d269f1091bf0220923f1b80c0f444f2 /tools/perf/scripts/python/bin | |
| parent | 2a97ca25f7d5fc7c7a475ff2a92b3fd2cfc8faf1 (diff) | |
clk/x86: pmc_atom: add kasprintf return value check
The kasprintf() function returns NULL on memory allocation failure, but
the code in plt_clk_register() was not checking this return value. If
kasprintf fails, init.name would be NULL and could cause NULL pointer
dereference when clkdev_hw_create() uses it.
Add proper error checking for the kasprintf() return value and return
ERR_PTR(-ENOMEM) on failure.
Fixes: 1141d9d08184 ("clk: x86: Add Atom PMC platform clocks")
Signed-off-by: longlong yan <yanlonglong@kylinos.cn>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
