summaryrefslogtreecommitdiff
path: root/linux-core/nv50_cursor.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-06-22 18:47:51 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-06-22 18:47:51 +0200
commite67cd7dda9d7d6d82f4026f246d07bf4c4021a57 (patch)
tree27d0cfeaee52daa79ac6d077420f074a29031d2d /linux-core/nv50_cursor.c
parent3809209349ccf12aa71c7848f0b21d77fa0a5f03 (diff)
NV50: A few minor added safeties + cleanup.
Diffstat (limited to 'linux-core/nv50_cursor.c')
-rw-r--r--linux-core/nv50_cursor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-core/nv50_cursor.c b/linux-core/nv50_cursor.c
index 3d35b936..4196df6b 100644
--- a/linux-core/nv50_cursor.c
+++ b/linux-core/nv50_cursor.c
@@ -140,6 +140,8 @@ int nv50_cursor_create(struct nv50_crtc *crtc)
return -EINVAL;
crtc->cursor = kzalloc(sizeof(struct nv50_cursor), GFP_KERNEL);
+ if (!crtc->cursor)
+ return -ENOMEM;
/* function pointers */
crtc->cursor->show = nv50_cursor_show;