drm/radeon: Don't dereference possibly-NULL pointer.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
fa9e855025
commit
e199fd4224
|
@ -241,7 +241,8 @@ int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain, u64 max_offset,
|
|||
domain_start = bo->rdev->mc.vram_start;
|
||||
else
|
||||
domain_start = bo->rdev->mc.gtt_start;
|
||||
WARN_ON_ONCE((*gpu_addr - domain_start) > max_offset);
|
||||
WARN_ON_ONCE(max_offset <
|
||||
(radeon_bo_gpu_offset(bo) - domain_start));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue