drm/nouveau/fbcon: fix module unload when fbcon init has failed for some reason
authorBen Skeggs <bskeggs@redhat.com>
Fri, 24 Jul 2020 07:01:39 +0000 (17:01 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 09:01:54 +0000 (11:01 +0200)
[ Upstream commit 498595abf5bd51f0ae074cec565d888778ea558f ]

Stale pointer was tripping up the unload path.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nouveau_fbcon.c

index 2b79e27dd89c6c04f2f298e212172ed4ddfc438e..275abc424ce25e5db29f45481f1a670fc1687585 100644 (file)
@@ -584,6 +584,7 @@ fini:
        drm_fb_helper_fini(&fbcon->helper);
 free:
        kfree(fbcon);
+       drm->fbcon = NULL;
        return ret;
 }