diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-01-05 16:31:06 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-01-09 03:49:09 +0100 |
commit | 91814744646351a470f256fbcb853fb5a7229a9f (patch) | |
tree | fb8246349b76462a06ae2710862998d1abfc7b41 /drivers/scsi | |
parent | scsi: libcxgbi: use GFP_ATOMIC in cxgbi_conn_alloc_pdu() (diff) | |
download | linux-91814744646351a470f256fbcb853fb5a7229a9f.tar.xz linux-91814744646351a470f256fbcb853fb5a7229a9f.zip |
scsi: aacraid: remove redundant setting of variable c
A previous commit no longer stores the contents of c, so we now have a
situation where c is being updated but the value is never read. Clean up
the code by removing the now redundant setting of variable c.
Cleans up clang warning:
drivers/scsi/aacraid/aachba.c:943:3: warning: Value stored to 'c' is
never read
Fixes: f4e8708d3104 ("scsi: aacraid: Fix udev inquiry race condition")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index a2bdd7931cf1..525d72fcbf3e 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -940,11 +940,8 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex) while (*cp == ' ') ++cp; /* last six chars reserved for vol type */ - c = 0; - if (strlen(cp) > sizeof(str->pid)) { - c = cp[sizeof(str->pid)]; + if (strlen(cp) > sizeof(str->pid)) cp[sizeof(str->pid)] = '\0'; - } inqstrcpy (cp, str->pid); kfree(cname); |