Skip to contentSkip to conversation

drivers/perf/arm_pmu: Delete an error message for a failed memory allocation in armpmu_alloc()

PATCH New SF Markus Elfring 1 participant 1 message May 15, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/perf/arm_pmu: Delete an error message for a failed memory allocation in armpmu_alloc()

From: Markus Elfring <[email protected]>
Date: Mon, 15 May 2017 19:09:03 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/perf/arm_pmu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/perf/arm_pmu.c +1 -3
index dc459eb1246b..30f24bb0a1d1 100644
@@ -787,10 +787,8 @@ struct arm_pmu *armpmu_alloc(void)
 	int cpu;
 
 	pmu = kzalloc(sizeof(*pmu), GFP_KERNEL);
-	if (!pmu) {
-		pr_info("failed to allocate PMU device!\n");
+	if (!pmu)
 		goto out;
-	}
 
 	pmu->hw_events = alloc_percpu(struct pmu_hw_events);
 	if (!pmu->hw_events) {
Signature · 1 line
2.13.0