Commit 48907c23 authored by Wei Yongjun's avatar Wei Yongjun Committed by Ben Skeggs

drm/nouveau/secboot/gm20b: fix the error return code in gm20b_secboot_tegra_read_wpr()

The error return code PTR_ERR(mc) is always 0 since mc is
equal to 0 in this error handling case.
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 60b95d70
...@@ -48,7 +48,7 @@ gm20b_secboot_tegra_read_wpr(struct gm200_secboot *gsb, u32 mc_base) ...@@ -48,7 +48,7 @@ gm20b_secboot_tegra_read_wpr(struct gm200_secboot *gsb, u32 mc_base)
mc = ioremap(mc_base, 0xd00); mc = ioremap(mc_base, 0xd00);
if (!mc) { if (!mc) {
nvkm_error(&sb->subdev, "Cannot map Tegra MC registers\n"); nvkm_error(&sb->subdev, "Cannot map Tegra MC registers\n");
return PTR_ERR(mc); return -ENOMEM;
} }
sb->wpr_addr = ioread32_native(mc + MC_SECURITY_CARVEOUT2_BOM_0) | sb->wpr_addr = ioread32_native(mc + MC_SECURITY_CARVEOUT2_BOM_0) |
((u64)ioread32_native(mc + MC_SECURITY_CARVEOUT2_BOM_HI_0) << 32); ((u64)ioread32_native(mc + MC_SECURITY_CARVEOUT2_BOM_HI_0) << 32);
......
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