mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-07 16:36:39 +07:00
habanalabs: return correct error code on MMU mapping failure
This patch fix a bug where EINVAL was returned instead of -EINVAL. Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
541664d360
commit
df3a8875b5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user