Skip to contentSkip to conversation

EDAC/sb_edac: Remove redundant initialization of variable rc

PATCH Applied Colin Ian King 2 participants 2 messages Nov 26, 2021 – Dec 21, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC/sb_edac: Remove redundant initialization of variable rc

The variable rc is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.

---
 drivers/edac/sb_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/sb_edac.c +1 -1
index 1522d4aa2ca6..9678ab97c7ac 100644
@@ -3439,7 +3439,7 @@ MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
 
 static int sbridge_probe(const struct x86_cpu_id *id)
 {
-	int rc = -ENODEV;
+	int rc;
 	u8 mc, num_mc = 0;
 	struct sbridge_dev *sbridge_dev;
 	struct pci_id_table *ptable = (struct pci_id_table *)id->driver_data;
Signature · 1 line
2.33.1
maintainer Applied
#1 lore raw
Quoted 15 lines · Colin Ian King

The variable rc is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.

---
 drivers/edac/sb_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/sb_edac.c +0 -0
index 1522d4aa2ca6..9678ab97c7ac 100644

drivers/edac/sb_edac.c MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids); · line 3445

Quoted 8 lines
drivers/edac/sb_edac.c +1 -1
@@ -3439,7 +3439,7 @@ MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
 
 static int sbridge_probe(const struct x86_cpu_id *id)
 {
-	int rc = -ENODEV;
+	int rc;
 	u8 mc, num_mc = 0;
 	struct sbridge_dev *sbridge_dev;
 	struct pci_id_table *ptable = (struct pci_id_table *)id->driver_data;

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette