diff options
author | Donald Robson <donald.robson@imgtec.com> | 2023-12-13 14:44:30 +0000 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2023-12-15 14:04:16 +0100 |
commit | f175498378bdae2ebcf61170a2a866cb96e8a69a (patch) | |
tree | 8de3ceeabc6eea71f53188f82b2491c49d9ff396 /drivers/gpu | |
parent | f1f55ed3ffe4212f5c96106bf6396c461a2bf223 (diff) | |
download | linux-stable-f175498378bdae2ebcf61170a2a866cb96e8a69a.tar.gz linux-stable-f175498378bdae2ebcf61170a2a866cb96e8a69a.tar.bz2 linux-stable-f175498378bdae2ebcf61170a2a866cb96e8a69a.zip |
drm/imagination: Fix ERR_PTR test on pointer to pointer.
drivers/gpu/drm/imagination/pvr_vm.c:631 pvr_vm_create_context()
error: 'vm_ctx->mmu_ctx' dereferencing possible ERR_PTR()
612 vm_ctx->mmu_ctx = pvr_mmu_context_create(pvr_dev);
613 err = PTR_ERR_OR_ZERO(&vm_ctx->mmu_ctx);
^
The address is never an error pointer so this will always return 0.
Remove the ampersand.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231213144431.94956-1-donald.robson@imgtec.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/imagination/pvr_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c index 82690cee978c..598d79d7c7d0 100644 --- a/drivers/gpu/drm/imagination/pvr_vm.c +++ b/drivers/gpu/drm/imagination/pvr_vm.c @@ -568,7 +568,7 @@ pvr_vm_create_context(struct pvr_device *pvr_dev, bool is_userspace_context) 0, 1ULL << device_addr_bits, 0, 0, &pvr_vm_gpuva_ops); vm_ctx->mmu_ctx = pvr_mmu_context_create(pvr_dev); - err = PTR_ERR_OR_ZERO(&vm_ctx->mmu_ctx); + err = PTR_ERR_OR_ZERO(vm_ctx->mmu_ctx); if (err) { vm_ctx->mmu_ctx = NULL; goto err_put_ctx; |