[PATCH] cxl/mem: remove redundant initialization of variable rc

DORMANTno replies

From: Colin King <hidden>
Date: 2021-03-11 16:56:48
Also in: linux-cxl, lkml
Subsystem: compute express link (cxl), the rest · Maintainers: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield, Vishal Verma, Dan Williams, Linus Torvalds

From: Colin Ian King <redacted>

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")
Signed-off-by: Colin Ian King <redacted>
---
 drivers/cxl/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
index 244cb7d89678..a2e22675e985 100644
--- a/drivers/cxl/mem.c
+++ b/drivers/cxl/mem.c
@@ -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);
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help