staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id...
authorColin Ian King <colin.king@canonical.com>
Thu, 23 Jul 2020 15:54:15 +0000 (16:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2020 18:34:34 +0000 (20:34 +0200)
The variables scsicmd_id and rc is being initialized with a value
that is never read and are being updated later with a new value.
The initializations are redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200723155415.994036-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorhba/visorhba_main.c

index 99c57ceeb357b90202cdbf7a3decaf92a8349100..7ae5306b92fedb9c5b37c4e5987f1802e0f6b6e2 100644 (file)
@@ -305,7 +305,7 @@ static int forward_taskmgmt_command(enum task_mgmt_types tasktype,
                (struct visorhba_devdata *)scsidev->host->hostdata;
        int notifyresult = 0xffff;
        wait_queue_head_t notifyevent;
-       int scsicmd_id = 0;
+       int scsicmd_id;
 
        if (devdata->serverdown || devdata->serverchangingstate)
                return FAILED;
@@ -1186,7 +1186,7 @@ static struct visor_driver visorhba_driver = {
  */
 static int visorhba_init(void)
 {
-       int rc = -ENOMEM;
+       int rc;
 
        visorhba_debugfs_dir = debugfs_create_dir("visorhba", NULL);
        if (!visorhba_debugfs_dir)