projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59f90f5
)
scsi: 3w-sas: Remove unneeded variable 'retval'
author
Yang Li
<yang.lee@linux.alibaba.com>
Tue, 9 Mar 2021 06:41:04 +0000
(14:41 +0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Fri, 19 Mar 2021 02:18:09 +0000
(22:18 -0400)
Fix the following coccicheck warning:
./drivers/scsi/3w-sas.c:866:5-11: Unneeded variable: "retval". Return "1"
on line 898
Link:
https://lore.kernel.org/r/1615272064-42109-1-git-send-email-yang.lee@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/3w-sas.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/3w-sas.c
b/drivers/scsi/3w-sas.c
index 383f6f204c24bb23b8d3c937f524873b9f88e06a..4fde39da54e4ea74016534e25f698480aacff533 100644
(file)
--- a/
drivers/scsi/3w-sas.c
+++ b/
drivers/scsi/3w-sas.c
@@
-860,7
+860,6
@@
static int twl_fill_sense(TW_Device_Extension *tw_dev, int i, int request_id, in
TW_Command_Full *full_command_packet;
unsigned short error;
char *error_str;
- int retval = 1;
header = tw_dev->sense_buffer_virt[i];
full_command_packet = tw_dev->command_packet_virt[request_id];
@@
-892,7
+891,7
@@
static int twl_fill_sense(TW_Device_Extension *tw_dev, int i, int request_id, in
goto out;
}
out:
- return
retval
;
+ return
1
;
} /* End twl_fill_sense() */
/* This function will free up device extension resources */