drm/nouveau/pmu: make sure the reset hook exists before running it
authorAlexandre Courbot <acourbot@nvidia.com>
Thu, 17 Nov 2016 07:37:29 +0000 (16:37 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 7 Mar 2017 07:05:11 +0000 (17:05 +1000)
commit485a20eff20a2cbc55c9061724356cae3df01781
tree14d0e2c9053fc633bc8101a08b7bb00ff48b5d58
parentba735d061dcbbb061721f302f1ef519c547d5bab
drm/nouveau/pmu: make sure the reset hook exists before running it

Some PMU implementations (in particular the ones managed by secure
boot) may not have a reset() hook. Make sure we don't crash in that
case.

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