mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
perf trace: Fix IS_ERR() vs NULL check bug
The alloc_syscall_stats() function always returns an error pointer
(ERR_PTR) on failure.
So replace NULL check with IS_ERR() check after calling
delete_syscall_stats() function.
Fixes: ef2da619b1 ("perf trace: Convert syscall_stats to hashmap")
Signed-off-by: wangguangju <wangguangju@hygon.cn>
Reviewed-by: Howard Chu <howardchu95@gmail.com>
Acked-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
0feca0b788
commit
96f202eab8
|
|
@ -1573,7 +1573,7 @@ static void delete_syscall_stats(struct hashmap *syscall_stats)
|
|||
struct hashmap_entry *pos;
|
||||
size_t bkt;
|
||||
|
||||
if (syscall_stats == NULL)
|
||||
if (IS_ERR(syscall_stats))
|
||||
return;
|
||||
|
||||
hashmap__for_each_entry(syscall_stats, pos, bkt)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user