Skip to content

Commit

Permalink
drm/nouveau/secboot/gm20b: fix the error return code in gm20b_secboot…
Browse files Browse the repository at this point in the history
…_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: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Wei Yongjun authored and Ben Skeggs committed Apr 29, 2017
1 parent 60b95d7 commit 48907c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ gm20b_secboot_tegra_read_wpr(struct gm200_secboot *gsb, u32 mc_base)
mc = ioremap(mc_base, 0xd00);
if (!mc) {
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) |
((u64)ioread32_native(mc + MC_SECURITY_CARVEOUT2_BOM_HI_0) << 32);
Expand Down

0 comments on commit 48907c2

Please sign in to comment.