If a NULL value is possible, the dereference should only occur after the NULL test.
Coverity CID: 13334 Signed-off-by: Darren Jenkins <darrenrjenk...@gmail.com> diff --git drivers/gpu/drm/radeon/radeon_fence.c drivers/gpu/drm/radeon/radeon_fence.c index 4cdd8b4..f3a8380 100644 --- drivers/gpu/drm/radeon/radeon_fence.c +++ drivers/gpu/drm/radeon/radeon_fence.c @@ -140,14 +140,14 @@ int radeon_fence_create(struct radeon_device *rdev, struct radeon_fence **fence) bool radeon_fence_signaled(struct radeon_fence *fence) { - struct radeon_device *rdev = fence->rdev; unsigned long irq_flags; bool signaled = false; - if (rdev->gpu_lockup) { + if (fence == NULL) { return true; } - if (fence == NULL) { + + if (fence->rdev->gpu_lockup) { return true; } write_lock_irqsave(&fence->rdev->fence_drv.lock, irq_flags); ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel