lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR11MB35115365560883FECD6C88DCC3AC0@BYAPR11MB3511.namprd11.prod.outlook.com>
Date:   Thu, 15 Aug 2019 00:33:17 +0000
From:   "Karan Tilak Kumar (kartilak)" <kartilak@...co.com>
To:     Colin King <colin.king@...onical.com>,
        "Satish Kharat (satishkh)" <satishkh@...co.com>,
        "Sesidhar Baddela (sebaddel)" <sebaddel@...co.com>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
CC:     "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: fnic: remove redundant assignment of variable rc

Acked-by:   Karan Tilak Kumar   <kartilak@...co.com>

-----Original Message-----
From: Colin King <colin.king@...onical.com> 
Sent: Tuesday, August 13, 2019 6:24 AM
To: Satish Kharat (satishkh) <satishkh@...co.com>; Sesidhar Baddela (sebaddel) <sebaddel@...co.com>; Karan Tilak Kumar (kartilak) <kartilak@...co.com>; James E . J . Bottomley <jejb@...ux.ibm.com>; Martin K . Petersen <martin.petersen@...cle.com>; linux-scsi@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
Subject: [PATCH] scsi: fnic: remove redundant assignment of variable rc

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

Variable ret is initialized to a value that is never read and it is
re-assigned later and immediatetly returns. Clean up the code by
removing rc and just returning 0.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 drivers/scsi/fnic/fnic_debugfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 21991c99db7c..13f7d88d6e57 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -52,7 +52,6 @@ static struct fc_trace_flag_type *fc_trc_flag;
  */
 int fnic_debugfs_init(void)
 {
-	int rc = -1;
 	fnic_trace_debugfs_root = debugfs_create_dir("fnic", NULL);
 
 	fnic_stats_debugfs_root = debugfs_create_dir("statistics",
@@ -70,8 +69,7 @@ int fnic_debugfs_init(void)
 		fc_trc_flag->fc_clear = 4;
 	}
 
-	rc = 0;
-	return rc;
+	return 0;
 }
 
 /*
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ