ARC: perf: don't add code for impossible case
authorVineet Gupta <vgupta@synopsys.com>
Mon, 20 Apr 2015 11:19:30 +0000 (16:49 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 20 Apr 2015 12:57:55 +0000 (18:27 +0530)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/perf_event.c

index 165e0b604167857a99977ac506ad68c988e15a53..fd2ec50102f201254b1e5e51b4bbc7fa93fba95a 100644 (file)
@@ -288,10 +288,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
        BUG_ON(pct_bcr.c > ARC_PMU_MAX_HWEVENTS);
 
        READ_BCR(ARC_REG_CC_BUILD, cc_bcr);
-       if (!cc_bcr.v) {
-               pr_err("Performance counters exist, but no countable conditions?\n");
-               return -ENODEV;
-       }
+       BUG_ON(!cc_bcr.v); /* Counters exist but No countable conditions ? */
 
        arc_pmu = devm_kzalloc(&pdev->dev, sizeof(struct arc_pmu), GFP_KERNEL);
        if (!arc_pmu)