summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-03-15 18:10:10 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-03-18 12:31:58 +0100
commitcf8178f78645148dc38b28263b9d3f604148e3a8 (patch)
treec031b2732062c07e5883b534a30bc4abfb868592
parentMerge tag 'nfs-for-4.11-2' of git://git.linux-nfs.org/projects/anna/linux-nfs (diff)
downloadlinux-cf8178f78645148dc38b28263b9d3f604148e3a8.tar.xz
linux-cf8178f78645148dc38b28263b9d3f604148e3a8.zip
x86/microcode/AMD: Remove redundant NULL check on mc
mc is a pointer to the static u8 array amd_ucode_patch and therefore can never be null, so the check is redundant. Remove it. Detected by CoverityScan, CID#1372871 ("Logically Dead Code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: kernel-janitors@vger.kernel.org Cc: x86-ml <x86@kernel.org> Link: http://lkml.kernel.org/r/20170315171010.17536-1-colin.king@canonical.com Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/cpu/microcode/amd.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 7889ae492af0..1d38e53c2d5c 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -352,8 +352,6 @@ void reload_ucode_amd(void)
u32 rev, dummy;
mc = (struct microcode_amd *)amd_ucode_patch;
- if (!mc)
- return;
rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);