提交 3655d54a 编写于 作者: D Darren Jenkins 提交者: Dave Airlie

drm/radeon/radeon_fence.c: move a dereference below the NULL test

If a NULL value is possible, the dereference should only occur after the
NULL test.

Coverity CID: 13334
Signed-off-by: NDarren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 d8a7f792
......@@ -140,16 +140,15 @@ 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)
return true;
}
if (fence == NULL) {
if (fence->rdev->gpu_lockup)
return true;
}
write_lock_irqsave(&fence->rdev->fence_drv.lock, irq_flags);
signaled = fence->signaled;
/* if we are shuting down report all fence as signaled */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册