[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 3/5] x86/ucode: Don't try to cope with NULL pointers in apply_microcode()
No paths to apply_microcode() pass a NULL pointer, and other hooks don't tolerate one in the first place. We can expect the core logic not to pass us junk, so drop the checks. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Wei Liu <wl@xxxxxxx> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/cpu/microcode/amd.c | 3 --- xen/arch/x86/cpu/microcode/intel.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/xen/arch/x86/cpu/microcode/amd.c b/xen/arch/x86/cpu/microcode/amd.c index c9656de55d..0ca0e9a038 100644 --- a/xen/arch/x86/cpu/microcode/amd.c +++ b/xen/arch/x86/cpu/microcode/amd.c @@ -219,9 +219,6 @@ static int apply_microcode(const struct microcode_patch *patch) struct cpu_signature *sig = &per_cpu(cpu_sig, cpu); uint32_t rev, old_rev = sig->rev; - if ( !patch ) - return -ENOENT; - if ( microcode_fits(patch) != NEW_UCODE ) return -EINVAL; diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c index 315fca9ff2..9cb077b583 100644 --- a/xen/arch/x86/cpu/microcode/intel.c +++ b/xen/arch/x86/cpu/microcode/intel.c @@ -270,9 +270,6 @@ static int apply_microcode(const struct microcode_patch *patch) struct cpu_signature *sig = &this_cpu(cpu_sig); uint32_t rev, old_rev = sig->rev; - if ( !patch ) - return -ENOENT; - if ( microcode_update_match(patch) != NEW_UCODE ) return -EINVAL; -- 2.11.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |