summaryrefslogtreecommitdiffstats
path: root/tools/cgroup
diff options
context:
space:
mode:
authorXiaomeng Tong <xiam0nd.tong@gmail.com>2022-03-27 07:57:33 +0200
committerWill Deacon <will@kernel.org>2022-04-04 11:50:02 +0200
commit2012a9e279013933885983cbe0a5fe828052563b (patch)
tree8996fa1ac5b3a3b615dcf9bc5c42af1bead87836 /tools/cgroup
parentarm64: Fix comments in macro __init_el2_gicv3 (diff)
downloadlinux-2012a9e279013933885983cbe0a5fe828052563b.tar.xz
linux-2012a9e279013933885983cbe0a5fe828052563b.zip
perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator
The bug is here: return cluster; The list iterator value 'cluster' will *always* be set and non-NULL by list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the list is empty or no element is found. To fix the bug, return 'cluster' when found, otherwise return NULL. Cc: stable@vger.kernel.org Fixes: 21bdbb7102ed ("perf: add qcom l2 cache perf events driver") Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com> Link: https://lore.kernel.org/r/20220327055733.4070-1-xiam0nd.tong@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/cgroup')
0 files changed, 0 insertions, 0 deletions