Commit 9b679045 authored by Ben Skeggs's avatar Ben Skeggs Committed by Kelsey Skunberg

drm/nouveau/fbcon: fix module unload when fbcon init has failed for some reason

BugLink: https://bugs.launchpad.net/bugs/1892822

[ Upstream commit 498595ab ]

Stale pointer was tripping up the unload path.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent d9995f84
...@@ -566,6 +566,7 @@ nouveau_fbcon_init(struct drm_device *dev) ...@@ -566,6 +566,7 @@ nouveau_fbcon_init(struct drm_device *dev)
drm_fb_helper_fini(&fbcon->helper); drm_fb_helper_fini(&fbcon->helper);
free: free:
kfree(fbcon); kfree(fbcon);
drm->fbcon = NULL;
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment