accel/habanalabs: fix gaudi2_get_tpc_idle_status() return
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 15 May 2023 10:32:18 +0000 (13:32 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 8 Jun 2023 09:35:55 +0000 (12:35 +0300)
The gaudi2_get_tpc_idle_status() function returned the incorrect variable
so it always returned true.

Fixes: d85f0531b928 ("accel/habanalabs: break is_idle function into per-engine sub-routines")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/gaudi2/gaudi2.c

index d21ef99..e900017 100644 (file)
@@ -7238,7 +7238,7 @@ static bool gaudi2_get_tpc_idle_status(struct hl_device *hdev, u64 *mask_arr, u8
 
        gaudi2_iterate_tpcs(hdev, &tpc_iter);
 
-       return tpc_idle_data.is_idle;
+       return *tpc_idle_data.is_idle;
 }
 
 static bool gaudi2_get_decoder_idle_status(struct hl_device *hdev, u64 *mask_arr, u8 mask_len,