Skip to content

Commit c8c062e

Browse files
RisinT96ogabbay
authored andcommitted
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>
1 parent 0b105a2 commit c8c062e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/accel/habanalabs/common/debugfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static ssize_t mmu_asid_va_write(struct file *file, const char __user *buf,
484484
struct hl_debugfs_entry *entry = s->private;
485485
struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
486486
struct hl_device *hdev = dev_entry->hdev;
487-
char kbuf[MMU_KBUF_SIZE];
487+
char kbuf[MMU_KBUF_SIZE] = {0};
488488
char *c;
489489
ssize_t rc;
490490

@@ -546,7 +546,7 @@ static ssize_t mmu_ack_error_value_write(struct file *file,
546546
struct hl_debugfs_entry *entry = s->private;
547547
struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
548548
struct hl_device *hdev = dev_entry->hdev;
549-
char kbuf[MMU_KBUF_SIZE];
549+
char kbuf[MMU_KBUF_SIZE] = {0};
550550
ssize_t rc;
551551

552552
if (count > sizeof(kbuf) - 1)

0 commit comments

Comments
 (0)