drm: fix oops on reading proc file with no master
authorDave Airlie <airlied@redhat.com>
Mon, 12 May 2008 06:28:40 +0000 (16:28 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 12 May 2008 06:28:40 +0000 (16:28 +1000)
linux-core/drm_proc.c

index b6748b9..7f18520 100644 (file)
@@ -175,6 +175,9 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request,
                return 0;
        }
 
+       if (!master)
+               return 0;
+
        *start = &buf[offset];
        *eof = 0;