scsi: fnic: remove redundant assignment of variable rc
authorColin Ian King <colin.king@canonical.com>
Tue, 13 Aug 2019 13:23:49 +0000 (14:23 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 01:51:00 +0000 (21:51 -0400)
Variable ret is initialized to a value that is never read and it is
re-assigned later and immediately returns. Clean up the code by removing
rc and just returning 0.

[mkp: typo]

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/fnic/fnic_debugfs.c

index 21991c9..13f7d88 100644 (file)
@@ -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;
 }
 
 /*