diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-08-08 20:01:44 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-08-12 21:34:06 -0400 |
commit | 58e060e11b0b18298208e5d0d1bd9bd98b4238a7 (patch) | |
tree | 76c83c4fdf68859130640f6e39d229675cbbcafc /drivers/scsi/qla2xxx | |
parent | cc74049f35e84b6727c70589750c84e6166963ae (diff) |
scsi: qla2xxx: Complain if a mailbox command times out
This patch fixes the following Coverity complaint:
Unchecked return value (CHECKED_RETURN)
check_return: Calling wait_for_completion_timeout without checking return
value (as is done elsewhere 14 out of 17 times).
Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index b6be7e7f2a43..9e3f2f462a2e 100644 --- a/drivers/scsi/qla2xxx/qla_mr.c +++ b/drivers/scsi/qla2xxx/qla_mr.c @@ -148,7 +148,8 @@ qlafx00_mailbox_command(scsi_qla_host_t *vha, struct mbx_cmd_32 *mcp) QLAFX00_SET_HST_INTR(ha, ha->mbx_intr_code); spin_unlock_irqrestore(&ha->hardware_lock, flags); - wait_for_completion_timeout(&ha->mbx_intr_comp, mcp->tov * HZ); + WARN_ON_ONCE(wait_for_completion_timeout(&ha->mbx_intr_comp, + mcp->tov * HZ) != 0); } else { ql_dbg(ql_dbg_mbx, vha, 0x112c, "Cmd=%x Polling Mode.\n", command); |