diff options
author | Jon Smirl <jonsmirl@yahoo.com> | 2004-10-19 02:50:14 +0000 |
---|---|---|
committer | Jon Smirl <jonsmirl@yahoo.com> | 2004-10-19 02:50:14 +0000 |
commit | ca1ec9268f9de783daf3f2db86a4fb47108d609a (patch) | |
tree | cc54aca4693e2136da582e63612ad797892d6425 | |
parent | 0d89b19325d533a7c1817fcb568a1879fd28a865 (diff) |
drm-core, Clean up bug error path on stealth mode exit
-rw-r--r-- | linux-core/drm_drv.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 59a194d9..b59b5ca5 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -437,6 +437,10 @@ void __exit drm_exit(struct drm_driver *driver) if (drm_fb_loaded) { for (i = 0; i < cards_limit; i++) { head = drm_heads[i]; + if (!head) + continue; + if (!head->dev) + continue; if (head->dev->driver != driver) continue; dev = head->dev; @@ -491,12 +495,12 @@ static int __init drm_core_init(void) DRIVER_NAME, DRIVER_MAJOR, DRIVER_MINOR, DRIVER_PATCHLEVEL, DRIVER_DATE); return 0; - err_p3: +err_p3: drm_sysfs_destroy(drm_class); - err_p2: +err_p2: unregister_chrdev(DRM_MAJOR, "drm"); drm_free(drm_heads, sizeof(*drm_heads) * cards_limit, DRM_MEM_STUB); - err_p1: +err_p1: return ret; } |