Blob Blame History Raw
From: Colin Ian King <colin.king@canonical.com>
Date: Wed, 29 Sep 2021 14:27:53 +0100
Subject: octeontx2-af: Remove redundant initialization of variable pin
Patch-mainline: v5.16-rc1
Git-commit: 75f81afb27c366fa5a85bd2b75d0e9fd00097a50
References: jsc#SLE-24682

The variable pin is being initialized with a value that is never
read, it is being updated later on in only one case of a switch
statement.  The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
@@ -194,7 +194,7 @@ static int otx2_ptp_enable(struct ptp_cl
 {
 	struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
 					    ptp_info);
-	int pin = -1;
+	int pin;
 
 	if (!ptp->nic)
 		return -ENODEV;