OSDN Git Service

drm/nouveau: Skip vga_fini on non-PCI device
authorMikko Perttunen <mperttunen@nvidia.com>
Fri, 9 Jun 2017 12:25:41 +0000 (15:25 +0300)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:05:04 +0000 (14:05 +1000)
commit876ea7be6a71614ef80c05037350a2ff986e3a80
tree25d6c31b3a40fa63183f3bff5b04e0effefa34d5
parentfcd504e31292c9fdba07bcd44350c145bc214183
drm/nouveau: Skip vga_fini on non-PCI device

As with vga_init, this function doesn't make sense on non-PCI devices,
and the Thunderbolt check in it dereferences a NULL pointer in that
case. Add some code to skip this function when the device is not a PCI
device.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_vga.c