]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
perf/dwc_pcie: Fix use of uninitialized variable
authorIlkka Koskinen <ilkka@os.amperecomputing.com>
Tue, 23 Sep 2025 21:31:36 +0000 (14:31 -0700)
committerWill Deacon <will@kernel.org>
Wed, 24 Sep 2025 11:13:19 +0000 (12:13 +0100)
Fix use of uninitialized variable in group validation code.

Fixes: 71396cfac97d ("perf/dwc_pcie: Support counting multiple lane events in parallel")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202509231223.gZsX6Eio-lkp@intel.com/
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/dwc_pcie_pmu.c

index d77f767cde8934fa2038a0939dafa6e1f668b8ca..22f73ac894e9598affa8a3c267a9d4c55f5989ab 100644 (file)
@@ -402,7 +402,7 @@ static int dwc_pcie_pmu_validate_group(struct perf_event *event)
 {
        struct perf_event *sibling, *leader = event->group_leader;
        DECLARE_BITMAP(val_lane_events, 2 * DWC_PCIE_LANE_MAX_EVENTS_PER_GROUP);
-       bool time_event;
+       bool time_event = false;
        int type;
 
        type = DWC_PCIE_EVENT_TYPE(leader);