As part of handling of the multi-CS wait ioctl, hl_cs_poll_fences() is
called in a "while (true)" loop. This function can fail, but the
checking of its return value was missed.
Add this check and exit the loop in case of a failure.
Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
                mcs_data.update_ts = false;
                rc = hl_cs_poll_fences(&mcs_data, mcs_compl);
 
-               if (mcs_data.completion_bitmap)
+               if (rc || mcs_data.completion_bitmap)
                        break;
 
                /*