@@ -498,6 +498,7 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
498498{
499499 uint32_t reset_id ;
500500 unsigned long flags ;
501+ int ret ;
501502
502503 /* Read reset ID */
503504 reset_id = ish_reg_read (dev , IPC_REG_ISH2HOST_MSG ) & 0xFFFF ;
@@ -510,12 +511,11 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
510511 /* ISHTP notification in IPC_RESET */
511512 ishtp_reset_handler (dev );
512513
513- if (!ish_is_input_ready (dev ))
514- timed_wait_for_timeout (dev , WAIT_FOR_INPUT_RDY ,
515- TIME_SLICE_FOR_INPUT_RDY_MS , TIMEOUT_FOR_INPUT_RDY_MS );
516-
514+ ret = timed_wait_for_timeout (dev , WAIT_FOR_INPUT_RDY ,
515+ TIME_SLICE_FOR_INPUT_RDY_MS ,
516+ TIMEOUT_FOR_INPUT_RDY_MS );
517517 /* ISH FW is dead */
518- if (! ish_is_input_ready ( dev ) )
518+ if (ret )
519519 return - EPIPE ;
520520
521521 /* Send clock sync at once after reset */
@@ -531,9 +531,10 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
531531 sizeof (uint32_t ));
532532
533533 /* Wait for ISH FW'es ILUP and ISHTP_READY */
534- timed_wait_for_timeout (dev , WAIT_FOR_FW_RDY ,
535- TIME_SLICE_FOR_FW_RDY_MS , TIMEOUT_FOR_FW_RDY_MS );
536- if (!ishtp_fw_is_ready (dev )) {
534+ ret = timed_wait_for_timeout (dev , WAIT_FOR_FW_RDY ,
535+ TIME_SLICE_FOR_FW_RDY_MS ,
536+ TIMEOUT_FOR_FW_RDY_MS );
537+ if (ret ) {
537538 /* ISH FW is dead */
538539 uint32_t ish_status ;
539540
0 commit comments