diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2022-06-19 12:35:06 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-07-12 09:09:23 +0300 |
commit | abe85a9c11a9b982199db4d66f71c482069ed1cf (patch) | |
tree | 38b4dc7c13e82f0ddf8993ecbc5f908d11006e41 /drivers/misc | |
parent | e41c6418565d01df9b5d2005cabc0c2f71033c69 (diff) | |
download | linux-abe85a9c11a9b982199db4d66f71c482069ed1cf.tar.bz2 |
habanalabs: check fence pointer before use
fence pointer can be NULL in this path, as shown by an earlier check.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/command_submission.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c index c050f38b7091..e5549a9da42e 100644 --- a/drivers/misc/habanalabs/common/command_submission.c +++ b/drivers/misc/habanalabs/common/command_submission.c @@ -2581,7 +2581,7 @@ static int hl_cs_poll_fences(struct multi_cs_data *mcs_data, struct multi_cs_com * For this we have to validate that the timestamp is * earliest of all timestamps so far. */ - if (mcs_data->update_ts && + if (fence && mcs_data->update_ts && (ktime_compare(fence->timestamp, first_cs_time) < 0)) first_cs_time = fence->timestamp; break; |