lkml.org 
[lkml]   [2019]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf/x86/uncore: Remove unnecessary check for uncore_pmu
Date
From: Kan Liang <kan.liang@linux.intel.com>

The uncore_pmu pointer in uncore_pmu_enable/disable() is from
container_of, which never be NULL.

Remove the unnecessary check for uncore_pmu.

Fixes: 75be6f703a14 ("perf/x86/uncore: Fix event group support")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Cc: stable@vger.kernel.org
---
arch/x86/events/intel/uncore.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 86467f8..81eed07 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -780,9 +780,6 @@ static void uncore_pmu_enable(struct pmu *pmu)
struct intel_uncore_box *box;

uncore_pmu = container_of(pmu, struct intel_uncore_pmu, pmu);
- if (!uncore_pmu)
- return;
-
box = uncore_pmu_to_box(uncore_pmu, smp_processor_id());
if (!box)
return;
@@ -797,9 +794,6 @@ static void uncore_pmu_disable(struct pmu *pmu)
struct intel_uncore_box *box;

uncore_pmu = container_of(pmu, struct intel_uncore_pmu, pmu);
- if (!uncore_pmu)
- return;
-
box = uncore_pmu_to_box(uncore_pmu, smp_processor_id());
if (!box)
return;
--
2.7.4
\
 
 \ /
  Last update: 2019-11-13 14:38    [W:0.118 / U:1.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site