summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorKoby Elbaz <kelbaz@habana.ai>2021-06-10 08:14:43 +0200
committerOded Gabbay <ogabbay@kernel.org>2021-06-18 14:23:42 +0200
commit1f7ef4bf41c7c2abad3d21b8c69db11fc3ebc4f5 (patch)
tree77149267fec6ce92d057a239e29dce5ba10bac88 /drivers/misc
parenthabanalabs/gaudi: update coresight configuration (diff)
downloadlinux-1f7ef4bf41c7c2abad3d21b8c69db11fc3ebc4f5.tar.xz
linux-1f7ef4bf41c7c2abad3d21b8c69db11fc3ebc4f5.zip
habanalabs/gaudi: set the correct rc in case of err
fix the following smatch warnings: gaudi_internal_cb_pool_init() warn: missing error code 'rc' 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')
-rw-r--r--drivers/misc/habanalabs/gaudi/gaudi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index a46ec601a635..e66433d05616 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -8393,8 +8393,10 @@ static int gaudi_internal_cb_pool_init(struct hl_device *hdev,
HL_VA_RANGE_TYPE_HOST, HOST_SPACE_INTERNAL_CB_SZ,
HL_MMU_VA_ALIGNMENT_NOT_NEEDED);
- if (!hdev->internal_cb_va_base)
+ if (!hdev->internal_cb_va_base) {
+ rc = -ENOMEM;
goto destroy_internal_cb_pool;
+ }
mutex_lock(&ctx->mmu_lock);
rc = hl_mmu_map_contiguous(ctx, hdev->internal_cb_va_base,