From: Paul Gortmaker Date: Wed, 8 Apr 2020 23:52:16 +0000 (-0400) Subject: perf/x86/intel/pt: Drop pointless NULL assignment. X-Git-Tag: v5.10.7~2528^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4bd30106ddb26d2304adc5bb7bd269825300440d;p=platform%2Fkernel%2Flinux-rpi.git perf/x86/intel/pt: Drop pointless NULL assignment. Only a few lines below this removed line is this: attrs = kzalloc(size, GFP_KERNEL); and since there is no code path where this could be avoided, the NULL assignment is a pointless relic of history and can be removed. Signed-off-by: Paul Gortmaker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200408235216.108980-1-paul.gortmaker@windriver.com --- diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index 1db7a51..e94af4a 100644 --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c @@ -226,8 +226,6 @@ static int __init pt_pmu_hw_init(void) pt_pmu.vmx = true; } - attrs = NULL; - for (i = 0; i < PT_CPUID_LEAVES; i++) { cpuid_count(20, i, &pt_pmu.caps[CPUID_EAX + i*PT_CPUID_REGS_NUM],