Commit 0a0c721d authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie

drm: avoid kernel oops in some error paths calling drm_lastclose

Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent bd5af078
......@@ -155,11 +155,13 @@ int drm_lastclose(drm_device_t * dev)
del_timer(&dev->timer);
/* Clear pid list */
if (dev->magicfree.next) {
list_for_each_entry_safe(pt, next, &dev->magicfree, head) {
list_del(&pt->head);
drm_ht_remove_item(&dev->magiclist, &pt->hash_item);
drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC);
}
}
/* Clear AGP information */
if (drm_core_has_AGP(dev) && dev->agp) {
......
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