diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2022-07-04 11:53:57 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-07-12 09:09:29 +0300 |
commit | cf008f5acb9047891f7fa7c234bd838120fe1b50 (patch) | |
tree | 8d240fa8eb2db24f006fdf9e82847bb67c78ec94 /drivers/misc/habanalabs/common/command_submission.c | |
parent | f2d9ec872c5db258ba8998b6b4c17866fca95ada (diff) | |
download | linux-cf008f5acb9047891f7fa7c234bd838120fe1b50.tar.xz |
habanalabs: make sure variable is set before used
timestamp could be unset in both _hl_interrupt_wait_ioctl() and
_hl_interrupt_wait_ioctl_user_addr() so it is better to explicitly
initialize it to 0 when declaring it.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/command_submission.c')
-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 941f1ff190ae..90a4574cbe2d 100644 --- a/drivers/misc/habanalabs/common/command_submission.c +++ b/drivers/misc/habanalabs/common/command_submission.c @@ -3345,8 +3345,8 @@ static int hl_interrupt_wait_ioctl(struct hl_fpriv *hpriv, void *data) struct hl_user_interrupt *interrupt; union hl_wait_cs_args *args = data; u32 status = HL_WAIT_CS_STATUS_BUSY; + u64 timestamp = 0; int rc, int_idx; - u64 timestamp; prop = &hdev->asic_prop; |