diff options
author | Dave Airlie <airlied@redhat.com> | 2018-02-16 07:26:01 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-02-16 07:26:01 +0300 |
commit | bfad2d08e540b18cfd92694fbb388e7d202df31f (patch) | |
tree | f68d7dbcc66d2e208918a89930cb40448e725722 | |
parent | 8d3c62943991f0bccbf34087bc731986881f421d (diff) | |
parent | 92256269893e96e5f9e8ac6dd882a0bef63fcea7 (diff) | |
download | linux-bfad2d08e540b18cfd92694fbb388e7d202df31f.tar.xz |
Merge branch 'linux-4.16' of git://github.com/skeggsb/linux into drm-fixes
single fix for older gpus.
* 'linux-4.16' of git://github.com/skeggsb/linux:
drm/nouveau: Make clock gate support conditional
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c index bf62303571b3..3695cde669f8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c @@ -301,7 +301,7 @@ nvkm_therm_attr_set(struct nvkm_therm *therm, void nvkm_therm_clkgate_enable(struct nvkm_therm *therm) { - if (!therm->func->clkgate_enable || !therm->clkgating_enabled) + if (!therm || !therm->func->clkgate_enable || !therm->clkgating_enabled) return; nvkm_debug(&therm->subdev, @@ -312,7 +312,7 @@ nvkm_therm_clkgate_enable(struct nvkm_therm *therm) void nvkm_therm_clkgate_fini(struct nvkm_therm *therm, bool suspend) { - if (!therm->func->clkgate_fini || !therm->clkgating_enabled) + if (!therm || !therm->func->clkgate_fini || !therm->clkgating_enabled) return; nvkm_debug(&therm->subdev, @@ -395,7 +395,7 @@ void nvkm_therm_clkgate_init(struct nvkm_therm *therm, const struct nvkm_therm_clkgate_pack *p) { - if (!therm->func->clkgate_init || !therm->clkgating_enabled) + if (!therm || !therm->func->clkgate_init || !therm->clkgating_enabled) return; therm->func->clkgate_init(therm, p); |