Skip to contentSkip to conversation

cxl/mem: remove redundant initialization of variable rc

PATCH New Colin King 1 participant 1 message Feb 15, 2021

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 cxl/mem: remove redundant initialization of variable rc

From: Colin Ian King <[email protected]>

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

Addresses-Coverity: ("Unused value")

---
 drivers/cxl/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/mem.c +1 -1
index 3bca8451348a..81e557a54fa4 100644
@@ -383,8 +383,8 @@ static int __cxl_mem_mbox_send_cmd(struct cxl_mem *cxlm,
 static int cxl_mem_mbox_get(struct cxl_mem *cxlm)
 {
 	struct device *dev = &cxlm->pdev->dev;
-	int rc = -EBUSY;
 	u64 md_status;
+	int rc;
 
 	mutex_lock_io(&cxlm->mbox_mutex);
 
Signature · 1 line
2.30.0