[PATCH openEuler-5.10-LTS 145/166] perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator