* [PATCH] staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id and rc
@ 2020-07-23 15:54 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2020-07-23 15:54 UTC (permalink / raw)
To: David Kershner, Greg Kroah-Hartman, sparmaintainer, devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/staging/unisys/visorhba/visorhba_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 99c57ceeb357..7ae5306b92fe 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -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)
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-23 15:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 15:54 [PATCH] staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id and rc Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).