projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2edb07
)
drm/amdgpu: fix dereference before check
author
Christian König
<
[email protected]
>
Mon, 11 May 2015 12:32:17 +0000
(14:32 +0200)
committer
Alex Deucher
<
[email protected]
>
Thu, 4 Jun 2015 01:03:33 +0000
(21:03 -0400)
Signed-off-by: Christian König <
[email protected]
>
Reviewed-by: Alex Deucher <
[email protected]
>
Reviewed-by: Jammy Zhou <
[email protected]
>
Reviewed-by: Monk Liu <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 66c66f83b40762e6d5cfabfa834c83a7c11259b4..74ed94ee7102fb8e77256e588b7801a1fa9d67ef 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@
-138,9
+138,9
@@
void amdgpu_ib_free(struct amdgpu_device *adev, struct amdgpu_ib *ib)
int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
struct amdgpu_ib *ibs, void *owner)
{
- struct amdgpu_ring *ring;
- struct amdgpu_vm *vm = ibs->vm;
struct amdgpu_ib *ib = &ibs[0];
+ struct amdgpu_ring *ring;
+ struct amdgpu_vm *vm;
unsigned i;
int r = 0;
@@
-148,6
+148,8
@@
int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
return -EINVAL;
ring = ibs->ring;
+ vm = ibs->vm;
+
if (!ring->ready) {
dev_err(adev->dev, "couldn't schedule ib\n");
return -EINVAL;