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:
04b8a4b
)
drm/nouveau/pmu: do not assume a PMU is present
author
Alexandre Courbot
<acourbot@nvidia.com>
Thu, 3 Sep 2015 08:39:52 +0000
(17:39 +0900)
committer
Ben Skeggs
<bskeggs@redhat.com>
Tue, 3 Nov 2015 05:02:18 +0000
(15:02 +1000)
Some devices may not have a PMU. Avoid a NULL pointer dereference in
such cases by checking whether the pointer given to nvkm_pmu_pgob() is
valid.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
index 27a79c0c38886522d3b8d1d1df651e4cd054bcd4..d95eb8659d1bdb6279d256b6e90f49d04cff2215 100644
(file)
--- a/
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
+++ b/
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
@@
-28,7
+28,7
@@
void
nvkm_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
{
- if (pmu->func->pgob)
+ if (pmu
&& pmu
->func->pgob)
pmu->func->pgob(pmu, enable);
}