]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
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 07:47:59 +0000 (09:47 +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 2b12d82aac1509f7023b24e15d5f04fe7ecc8290..ee8f744dc48811a199b72cc7f93a1261eb730689 100644 (file)
@@ -543,6 +543,7 @@ fini:
        drm_fb_helper_fini(&fbcon->helper);
 free:
        kfree(fbcon);
+       drm->fbcon = NULL;
        return ret;
 }