tools: acrnd: Fixed get_sos_wakeup_reason()

get_sos_wakeup_reason() runs into error branch without any error, so
no wakeup reason will be returend.

Acked-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
yuhong.tao@intel.com 2018-08-13 19:00:31 +08:00 committed by lijinxia
parent 2d802d0afe
commit a86a25f369
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ unsigned get_sos_wakeup_reason(void)
req.msgid = WAKEUP_REASON;
req.timestamp = time(NULL);
if (mngr_send_msg(client_fd, &req, &ack, DEFAULT_TIMEOUT))
if (mngr_send_msg(client_fd, &req, &ack, DEFAULT_TIMEOUT) <= 0)
fprintf(stderr, "Failed to get wakeup_reason from SOS, err(%d)\n", ret);
else
ret = ack.data.reason;