Skip to content

Commit eec73c2

Browse files
Colin Ian Kingmartinkpetersen
authored andcommitted
scsi: qla4xxx: Remove redundant check on drvr_wait
The check for a non-zero drvr_wait is redundant as the same check is performed earlier in the outer while loop, the inner check will always be true if we reached this point inside the while loop. Remove the redundant if check. Detected by cppcheck: (warning) Identical inner 'if' condition is always true. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 9fe278f commit eec73c2

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎drivers/scsi/qla4xxx/ql4_init.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -766,12 +766,10 @@ int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a)
766766
while (drvr_wait) {
767767
if (ql4xxx_lock_drvr(a) == 0) {
768768
ssleep(QL4_LOCK_DRVR_SLEEP);
769-
if (drvr_wait) {
770-
DEBUG2(printk("scsi%ld: %s: Waiting for "
771-
"Global Init Semaphore(%d)...\n",
772-
a->host_no,
773-
__func__, drvr_wait));
774-
}
769+
DEBUG2(printk("scsi%ld: %s: Waiting for "
770+
"Global Init Semaphore(%d)...\n",
771+
a->host_no,
772+
__func__, drvr_wait));
775773
drvr_wait -= QL4_LOCK_DRVR_SLEEP;
776774
} else {
777775
DEBUG2(printk("scsi%ld: %s: Global Init Semaphore "

0 commit comments

Comments
 (0)