lkml.org 
[lkml]   [2020]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] habanalabs: fix error code in unmap_device_va()
Thanks, we already have a patch ready for that in -fixes branch that
will be applied in 5.8-rc2
Oded

On Thu, May 28, 2020 at 3:39 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> Smatch complains that "rc" can be uninitialized on certain paths.
>
> Fixes: 8ff5f4fd40df ("habanalabs: handle MMU cache invalidation timeout")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/misc/habanalabs/memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
> index 4b8eed1ca5130..47da84a177197 100644
> --- a/drivers/misc/habanalabs/memory.c
> +++ b/drivers/misc/habanalabs/memory.c
> @@ -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);
> --
> 2.26.2
>

\
 
 \ /
  Last update: 2020-05-28 15:06    [W:0.028 / U:8.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site