summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomer Tayar <ttayar@habana.ai>2022-02-10 10:56:02 +0200
committerOded Gabbay <ogabbay@kernel.org>2022-02-28 14:22:05 +0200
commit59456f4c2250e1fb15b1a82bfe2ef1aaf217fa1b (patch)
tree261f2cb95a4c8b003e4e183435561fc7324541a2
parent2908826d09f829528cb507ce547967beccf4388d (diff)
downloadlinux-59456f4c2250e1fb15b1a82bfe2ef1aaf217fa1b.tar.bz2
habanalabs: avoid using an uninitialized variable
Fix the following compilation warning in hl_cb_ioctl() @ command_buffer.c: warning: ‘device_va’ may be used uninitialized in this function Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
-rw-r--r--drivers/misc/habanalabs/common/command_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/command_buffer.c b/drivers/misc/habanalabs/common/command_buffer.c
index b9483a3cee91..a507110f6443 100644
--- a/drivers/misc/habanalabs/common/command_buffer.c
+++ b/drivers/misc/habanalabs/common/command_buffer.c
@@ -424,8 +424,8 @@ int hl_cb_ioctl(struct hl_fpriv *hpriv, void *data)
{
union hl_cb_args *args = data;
struct hl_device *hdev = hpriv->hdev;
+ u64 handle = 0, device_va = 0;
enum hl_device_status status;
- u64 handle = 0, device_va;
u32 usage_cnt = 0;
int rc;