Skip to contentSkip to conversation

cxl/mem: remove redundant initialization of variable rc

PATCH New Colin King 1 participant 1 message Mar 11, 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 244cb7d89678..a2e22675e985 100644
@@ -778,7 +778,7 @@ static long cxl_memdev_ioctl(struct file *file, unsigned int cmd,
 {
 	struct cxl_memdev *cxlmd;
 	struct inode *inode;
-	int rc = -ENOTTY;
+	int rc;
 
 	inode = file_inode(file);
 	cxlmd = container_of(inode->i_cdev, typeof(*cxlmd), cdev);
Signature · 1 line
2.30.2