[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-cf8178f78645148dc38b28263b9d3f604148e3a8@git.kernel.org>
Date: Sat, 18 Mar 2017 04:37:07 -0700
From: tip-bot for Colin Ian King <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, x86@...nel.org, mingo@...nel.org, bp@...e.de,
colin.king@...onical.com, hpa@...or.com,
linux-kernel@...r.kernel.org
Subject: [tip:x86/microcode] x86/microcode/AMD: Remove redundant NULL check
on mc
Commit-ID: cf8178f78645148dc38b28263b9d3f604148e3a8
Gitweb: http://git.kernel.org/tip/cf8178f78645148dc38b28263b9d3f604148e3a8
Author: Colin Ian King <colin.king@...onical.com>
AuthorDate: Wed, 15 Mar 2017 17:10:10 +0000
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 18 Mar 2017 12:31:58 +0100
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@...onical.com>
Cc: kernel-janitors@...r.kernel.org
Cc: x86-ml <x86@...nel.org>
Link: http://lkml.kernel.org/r/20170315171010.17536-1-colin.king@canonical.com
Signed-off-by: Borislav Petkov <bp@...e.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
arch/x86/kernel/cpu/microcode/amd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 7889ae4..1d38e53 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);
Powered by blists - more mailing lists