drm/nouveau/fbcon: fix NULL pointer access in nouveau_fbcon_destroy
authorKarol Herbst <kherbst@redhat.com>
Mon, 6 Nov 2017 15:20:33 +0000 (16:20 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 19 Dec 2017 00:16:37 +0000 (10:16 +1000)
commit34112bf4935dabe3c1d1fd42842ed771e279bf61
tree7f772fba062804dd5de35cc332df8d282ad3f6b1
parentd34ded7ece57782e75bf31bb145836b9f280750f
drm/nouveau/fbcon: fix NULL pointer access in nouveau_fbcon_destroy

When the fbcon object is initialized, but nouveau_fbcon_create is not
called, we run into a NULL pointer access within nouveau_fbcon_create when
unloading nouveau.

The call to drm_fb_helper_funcs.fb_probe is deferred until there is a
display for real since 4.14, that's why fbcon->helper.fb is still not set.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_fbcon.c