diff mbox series

EDAC/sb_edac: Remove redundant initialization of variable rc

Message ID 20211126221848.1125321-1-colin.i.king@gmail.com (mailing list archive)
State New, archived
Headers show
Series EDAC/sb_edac: Remove redundant initialization of variable rc | expand

Commit Message

Colin Ian King Nov. 26, 2021, 10:18 p.m. UTC
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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/edac/sb_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Borislav Petkov Dec. 21, 2021, 11:07 a.m. UTC | #1
On Fri, Nov 26, 2021 at 10:18:48PM +0000, Colin Ian King wrote:
> 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.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/edac/sb_edac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index 1522d4aa2ca6..9678ab97c7ac 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -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.
diff mbox series

Patch

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 1522d4aa2ca6..9678ab97c7ac 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -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;