From 442e12412396280eb5164d7b8f6792969c2cf6a0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 8 May 2008 16:11:25 +1000 Subject: drm: check for NULL fb here, shouldn't happen but avoid oops for now --- linux-core/intel_fb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux-core') diff --git a/linux-core/intel_fb.c b/linux-core/intel_fb.c index 63491b61..7df1525a 100644 --- a/linux-core/intel_fb.c +++ b/linux-core/intel_fb.c @@ -754,7 +754,12 @@ EXPORT_SYMBOL(intelfb_probe); int intelfb_remove(struct drm_device *dev, struct drm_crtc *crtc) { struct drm_framebuffer *fb = crtc->fb; - struct fb_info *info = fb->fbdev; + struct fb_info *info; + + if (!fb) + return -EINVAL; + + info = fb->fbdev; if (info) { unregister_framebuffer(info); -- cgit v1.2.3