projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd5af07
)
drm: avoid kernel oops in some error paths calling drm_lastclose
author
Thomas Hellstrom
<thomas@tungstengraphics.com>
Tue, 15 Aug 2006 23:21:56 +0000
(09:21 +1000)
committer
Dave Airlie
<airlied@linux.ie>
Thu, 21 Sep 2006 19:32:32 +0000
(
05:32
+1000)
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/drm_drv.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/drm/drm_drv.c
b/drivers/char/drm/drm_drv.c
index f9ecc8414b8a962d7773276485b5367e9b99cbef..654b95cdd9a3ddf378d3054d8f8c312afb27ddf4 100644
(file)
--- a/
drivers/char/drm/drm_drv.c
+++ b/
drivers/char/drm/drm_drv.c
@@
-155,10
+155,12
@@
int drm_lastclose(drm_device_t * dev)
del_timer(&dev->timer);
/* Clear pid list */
- 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);
+ 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 */