From 3a3de2bc201c302d44d2a71da1bd6a4cc4083748 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 27 May 2019 17:36:17 +0000 Subject: [PATCH] qla2x00t-32gbit: Complain if a mailbox command times out This patch avoids that Coverity reports the following: Unchecked return value (CHECKED_RETURN)16. check_return: Calling wait_for_completion_timeout without checking return value (as is done elsewhere 14 out of 17 times). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8372 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_mr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qla2x00t-32gbit/qla_mr.c b/qla2x00t-32gbit/qla_mr.c index 9eb86fd39..98f56cf51 100644 --- a/qla2x00t-32gbit/qla_mr.c +++ b/qla2x00t-32gbit/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);