All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cxl/mem: remove redundant initialization of variable rc
@ 2021-03-11 16:55 Colin King
  0 siblings, 0 replies; only message in thread
From: Colin King @ 2021-03-11 16:55 UTC (permalink / raw)
  To: Alison Schofield, Vishal Verma, Ira Weiny, Ben Widawsky,
	Dan Williams, linux-cxl
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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 <colin.king@canonical.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-11 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 16:55 [PATCH] cxl/mem: remove redundant initialization of variable rc Colin King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.