diff options
author | Koby Elbaz <kelbaz@habana.ai> | 2021-06-09 21:43:52 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-06-18 15:23:42 +0300 |
commit | f5eb7bf0c487a212ebda3c1b048fc3ccabacc147 (patch) | |
tree | 4158a65010b597f8166a02063c1baf00457ea954 /drivers/misc/habanalabs | |
parent | 11d5cb8b95456e2432dfee2ffcebf0623998493a (diff) |
habanalabs: remove node from list before freeing the node
fix the following smatch warnings:
goya_pin_memory_before_cs()
warn: '&userptr->job_node' not removed from list
gaudi_pin_memory_before_cs()
warn: '&userptr->job_node' not removed from list
Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r-- | drivers/misc/habanalabs/gaudi/gaudi.c | 1 | ||||
-rw-r--r-- | drivers/misc/habanalabs/goya/goya.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index ca1a8ca24d4a..a46ec601a635 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -5046,6 +5046,7 @@ already_pinned: return 0; unpin_memory: + list_del(&userptr->job_node); hl_unpin_host_memory(hdev, userptr); free_userptr: kfree(userptr); diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c index 2a9b91d5c6ff..e91b730baebd 100644 --- a/drivers/misc/habanalabs/goya/goya.c +++ b/drivers/misc/habanalabs/goya/goya.c @@ -3326,6 +3326,7 @@ already_pinned: return 0; unpin_memory: + list_del(&userptr->job_node); hl_unpin_host_memory(hdev, userptr); free_userptr: kfree(userptr); |