habanalabs: check the return value of hl_cs_poll_fences()
authorTomer Tayar <ttayar@habana.ai>
Tue, 28 Dec 2021 11:47:18 +0000 (13:47 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Feb 2022 12:22:01 +0000 (14:22 +0200)
commitaff5d9d378e77a45f33cd933b8b8ddac8fe43528
tree9668a32f763b5d35c0a4c3bb2e252ceeb3227a00
parent085686fb8491a7cbf6a7260d5b9d4169a041c340
habanalabs: check the return value of hl_cs_poll_fences()

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>
drivers/misc/habanalabs/common/command_submission.c