summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-05-08 16:11:25 +1000
committerDave Airlie <airlied@linux.ie>2008-05-08 16:11:25 +1000
commit442e12412396280eb5164d7b8f6792969c2cf6a0 (patch)
treeb2cdc7eba8f80346a9d52589b0b0b208c75ca59b /linux-core
parent19abd5c1ac3456e67241fbd2d8cd08148d6de9f9 (diff)
drm: check for NULL fb here, shouldn't happen but avoid oops for now
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/intel_fb.c7
1 files changed, 6 insertions, 1 deletions
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);