diff options
author | Tal Risin <trisin@habana.ai> | 2024-01-31 11:08:33 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2024-02-26 09:47:08 +0200 |
commit | c8c062e9671841c1b6c2b4b88fb1eb797bb6667c (patch) | |
tree | 8d8369dde9f718ab3a3c57197a71439ca35faebb /drivers/accel/habanalabs | |
parent | 0b105a2a7225f2736bd07aca0538cd67f09bfa20 (diff) | |
download | linux-stable-c8c062e9671841c1b6c2b4b88fb1eb797bb6667c.tar.gz linux-stable-c8c062e9671841c1b6c2b4b88fb1eb797bb6667c.tar.bz2 linux-stable-c8c062e9671841c1b6c2b4b88fb1eb797bb6667c.zip |
accel/habanalabs: initialize maybe-uninitialized variables
Prevent static analysis warning.
Signed-off-by: Tal Risin <trisin@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/accel/habanalabs')
-rw-r--r-- | drivers/accel/habanalabs/common/debugfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/accel/habanalabs/common/debugfs.c b/drivers/accel/habanalabs/common/debugfs.c index ab0fe74b49d0..b1c88d1837d9 100644 --- a/drivers/accel/habanalabs/common/debugfs.c +++ b/drivers/accel/habanalabs/common/debugfs.c @@ -484,7 +484,7 @@ static ssize_t mmu_asid_va_write(struct file *file, const char __user *buf, struct hl_debugfs_entry *entry = s->private; struct hl_dbg_device_entry *dev_entry = entry->dev_entry; struct hl_device *hdev = dev_entry->hdev; - char kbuf[MMU_KBUF_SIZE]; + char kbuf[MMU_KBUF_SIZE] = {0}; char *c; ssize_t rc; @@ -546,7 +546,7 @@ static ssize_t mmu_ack_error_value_write(struct file *file, struct hl_debugfs_entry *entry = s->private; struct hl_dbg_device_entry *dev_entry = entry->dev_entry; struct hl_device *hdev = dev_entry->hdev; - char kbuf[MMU_KBUF_SIZE]; + char kbuf[MMU_KBUF_SIZE] = {0}; ssize_t rc; if (count > sizeof(kbuf) - 1) |