summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2010-01-06 23:59:31 (GMT)
committerDave Airlie <airlied@redhat.com>2010-01-08 03:11:55 (GMT)
commit059d233f9c1183ed2f59d631e4daf486060e880d (patch)
tree840e214254502a26a882a5503badc94b8ec1a682
parentd0269ed8580b492df75dafb011dc51a1390bf200 (diff)
downloadlinux-059d233f9c1183ed2f59d631e4daf486060e880d.tar.xz
drm/radeon: mkregtable.c: close a file before exit
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/mkregtable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/mkregtable.c b/drivers/gpu/drm/radeon/mkregtable.c
index 0d79577..607241c 100644
--- a/drivers/gpu/drm/radeon/mkregtable.c
+++ b/drivers/gpu/drm/radeon/mkregtable.c
@@ -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 */