Commit df3a8875 authored by Omer Shpigelman's avatar Omer Shpigelman Committed by Greg Kroah-Hartman

habanalabs: return correct error code on MMU mapping failure

This patch fix a bug where EINVAL was returned instead of -EINVAL.
Signed-off-by: default avatarOmer Shpigelman <oshpigelman@habana.ai>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 541664d3
......@@ -710,7 +710,7 @@ static int _hl_mmu_map(struct hl_ctx *ctx, u64 virt_addr, u64 phys_addr,
dev_err(hdev->dev,
"DRAM: mapping already exists for virt_addr 0x%llx\n",
virt_addr);
rc = EINVAL;
rc = -EINVAL;
goto err;
}
......@@ -744,7 +744,7 @@ static int _hl_mmu_map(struct hl_ctx *ctx, u64 virt_addr, u64 phys_addr,
hop4_pte_addr),
hop4_pte_addr);
rc = EINVAL;
rc = -EINVAL;
goto err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment