From a51e38548cfdece2978e9b5f0d6f0467ba7a7272 Mon Sep 17 00:00:00 2001 From: Hong Liu Date: Fri, 9 May 2008 10:06:17 +0800 Subject: fix kernel oops when removing fb drm_crtc->fb may point to NULL, f.e X server will allocate a new fb and assign it to the CRTC at startup, when X server exits, it will destroy the allocated fb, making drm_crtc->fb points to NULL. --- linux-core/intel_fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'linux-core/intel_fb.c') diff --git a/linux-core/intel_fb.c b/linux-core/intel_fb.c index 50c24a75..9934e3af 100644 --- a/linux-core/intel_fb.c +++ b/linux-core/intel_fb.c @@ -767,9 +767,8 @@ int intelfb_probe(struct drm_device *dev, struct drm_crtc *crtc, struct drm_outp } EXPORT_SYMBOL(intelfb_probe); -int intelfb_remove(struct drm_device *dev, struct drm_crtc *crtc) +int intelfb_remove(struct drm_device *dev, struct drm_framebuffer *fb) { - struct drm_framebuffer *fb = crtc->fb; struct fb_info *info; if (!fb) @@ -784,7 +783,6 @@ int intelfb_remove(struct drm_device *dev, struct drm_crtc *crtc) drm_framebuffer_destroy(fb); framebuffer_release(info); } - crtc->fb = NULL; return 0; } EXPORT_SYMBOL(intelfb_remove); -- cgit v1.2.3