Skip to content

Commit f175498

Browse files
drobson-imgtecmripard
authored andcommitted
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
1 parent f1f55ed commit f175498

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/imagination/pvr_vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ pvr_vm_create_context(struct pvr_device *pvr_dev, bool is_userspace_context)
568568
0, 1ULL << device_addr_bits, 0, 0, &pvr_vm_gpuva_ops);
569569

570570
vm_ctx->mmu_ctx = pvr_mmu_context_create(pvr_dev);
571-
err = PTR_ERR_OR_ZERO(&vm_ctx->mmu_ctx);
571+
err = PTR_ERR_OR_ZERO(vm_ctx->mmu_ctx);
572572
if (err) {
573573
vm_ctx->mmu_ctx = NULL;
574574
goto err_put_ctx;

0 commit comments

Comments
 (0)