瀏覽代碼

arc: fix use of uninitialized arc_pmu

static arc_pmu in the arch/arc/kernel/perf_event.c is not initialized as
it's shadowed by a local variable of the same name in the
arc_pmu_device_probe.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Fixes: 03c94fcf954d "ARC: perf: make @arc_pmu static global"
CC: <stable@vger.kernel.org>	# 4.1
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Max Filippov 10 年之前
父節點
當前提交
7002f77541
共有 1 個文件被更改,包括 0 次插入1 次删除
  1. 0 1
      arch/arc/kernel/perf_event.c

+ 0 - 1
arch/arc/kernel/perf_event.c

@@ -266,7 +266,6 @@ static int arc_pmu_add(struct perf_event *event, int flags)
 
 
 static int arc_pmu_device_probe(struct platform_device *pdev)
 static int arc_pmu_device_probe(struct platform_device *pdev)
 {
 {
-	struct arc_pmu *arc_pmu;
 	struct arc_reg_pct_build pct_bcr;
 	struct arc_reg_pct_build pct_bcr;
 	struct arc_reg_cc_build cc_bcr;
 	struct arc_reg_cc_build cc_bcr;
 	int i, j, ret;
 	int i, j, ret;