diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-01-11 10:16:51 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-02-28 14:22:04 +0200 |
commit | a8076c47f6f78e5709d3a6b89c146c2706637f02 (patch) | |
tree | a987254bec9141983390c4ef374d443720166564 /drivers/misc | |
parent | d2cfd6897ce06aed87d989bf2a0b2d6bbba579db (diff) |
habanalabs: silence an uninitialized variable warning
Smatch warns that:
drivers/misc/habanalabs/common/command_buffer.c:471 hl_cb_ioctl()
error: uninitialized symbol 'device_va'.
Which is true, but harmless. Anyway, it's easy to silence this by
adding a error check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/command_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/command_buffer.c b/drivers/misc/habanalabs/common/command_buffer.c index 3c0ae07a2d80..b9483a3cee91 100644 --- a/drivers/misc/habanalabs/common/command_buffer.c +++ b/drivers/misc/habanalabs/common/command_buffer.c @@ -464,6 +464,8 @@ int hl_cb_ioctl(struct hl_fpriv *hpriv, void *data) args->in.flags, &usage_cnt, &device_va); + if (rc) + break; memset(&args->out, 0, sizeof(args->out)); |