aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/mkregtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/mkregtable.c')
-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 0d79577c157..607241c6a8a 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 */