habanalabs: initialize variable to default value

Fix the following smatch error in unmap_device_va():
error: uninitialized symbol 'rc'.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Link: https://lore.kernel.org/r/20200601065648.8775-1-oded.gabbay@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tomer Tayar 2020-06-01 09:56:47 +03:00 committed by Greg Kroah-Hartman
parent fb6d8d12ed
commit c68f1baeaf

View file

@ -1023,7 +1023,7 @@ static int unmap_device_va(struct hl_ctx *ctx, u64 vaddr, bool ctx_free)
struct hl_va_range *va_range;
enum vm_type_t *vm_type;
bool is_userptr;
int rc;
int rc = 0;
/* protect from double entrance */
mutex_lock(&ctx->mem_hash_lock);