]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arc: fix use of uninitialized arc_pmu
authorMax Filippov <jcmvbkbc@gmail.com>
Sat, 13 Jun 2015 23:09:06 +0000 (02:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 17:10:03 +0000 (10:10 -0700)
commit 7002f77541f877a5590615ceb3da32b114f14b62 upstream.

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"
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/kernel/perf_event.c

index fd2ec50102f201254b1e5e51b4bbc7fa93fba95a..57b58f52d825b866edd4aeecd75a652da933dbe0 100644 (file)
@@ -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)
 {
-       struct arc_pmu *arc_pmu;
        struct arc_reg_pct_build pct_bcr;
        struct arc_reg_cc_build cc_bcr;
        int i, j, ret;