aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptctl.c
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2022-08-05 11:32:14 +0000
committerMartin K. Petersen <[email protected]>2022-09-01 03:39:57 +0000
commit231159f33436326c97fd5f05a1926cae3e5b7885 (patch)
tree2ebfc4a086c6347cf131fefa3d6d8e012b7c1daa /drivers/message/fusion/mptctl.c
parentscsi: mpt3sas: Disable MPI2_FUNCTION_FW_DOWNLOAD for ATTO devices (diff)
downloadkernel-231159f33436326c97fd5f05a1926cae3e5b7885.tar.gz
kernel-231159f33436326c97fd5f05a1926cae3e5b7885.zip
scsi: message: fusion: Remove redundant variable iocnum
Variable iocnum is assigned a value that is never read, the assignment and hence the variable are redundant can be removed. Also update the comment to reflect the correct name of the variable being updated. Cleans up clang-scan warning: drivers/message/fusion/mptctl.c:641:8: warning: Although the value stored to 'iocnum' is used in the enclosing expression, the value is never actually read from 'iocnum' [deadcode.DeadStores] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r--drivers/message/fusion/mptctl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index f9ee957072c3..52c7020c9d19 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -620,7 +620,6 @@ __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
mpt_ioctl_header __user *uhdr = (void __user *) arg;
mpt_ioctl_header khdr;
- int iocnum;
unsigned iocnumX;
int nonblock = (file->f_flags & O_NONBLOCK);
int ret;
@@ -634,12 +633,11 @@ __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
ret = -ENXIO; /* (-6) No such device or address */
- /* Verify intended MPT adapter - set iocnum and the adapter
+ /* Verify intended MPT adapter - set iocnumX and the adapter
* pointer (iocp)
*/
iocnumX = khdr.iocnum & 0xFF;
- if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
- (iocp == NULL))
+ if ((mpt_verify_adapter(iocnumX, &iocp) < 0) || (iocp == NULL))
return -ENODEV;
if (!iocp->active) {