summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-02-24 17:43:30 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-02-28 06:19:43 +0300
commitfbdab3e7fd547e1ce558db1521659707bdf02cc6 (patch)
tree22cc39a271f2175a56f22b1ce8a56cbeb2b11e07 /drivers/scsi
parent825c6abbc316f496cd2b66e1fa72892cf4b49a9f (diff)
downloadlinux-fbdab3e7fd547e1ce558db1521659707bdf02cc6.tar.xz
scsi: aacraid: remove redundant zero check on ret
The check for ret being zero is redundant as a few statements earlier we break out of the while loop if ret is non-zero. Thus we can remove the zero check and also the dead-code non-zero case too. Detected by CoverityScan, CID#1411632 ("Logically Dead Code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/commsup.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 1994c7445b54..a3ad04293487 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -2508,8 +2508,7 @@ int aac_command_thread(void *data)
&& (now.tv_usec > (1000000 / HZ)))
difference = (((1000000 - now.tv_usec) * HZ)
+ 500000) / 1000000;
- else if (ret == 0) {
-
+ else {
if (now.tv_usec > 500000)
++now.tv_sec;
@@ -2520,9 +2519,6 @@ int aac_command_thread(void *data)
ret = aac_send_hosttime(dev, &now);
difference = (long)(unsigned)update_interval*HZ;
- } else {
- /* retry shortly */
- difference = 10 * HZ;
}
next_jiffies = jiffies + difference;
if (time_before(next_check_jiffies,next_jiffies))