Merge branch 'skip_delete_inode' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / gpu / drm / radeon / mkregtable.c
index 0d79577..607241c 100644 (file)
@@ -661,8 +661,10 @@ static int parser_auth(struct table *t, const char *filename)
        fseek(file, 0, SEEK_SET);
 
        /* get header */
-       if (fgets(buf, 1024, file) == NULL)
+       if (fgets(buf, 1024, file) == NULL) {
+               fclose(file);
                return -1;
+       }
 
        /* first line will contain the last register
         * and gpu name */