From: Alexander Beregalov Date: Wed, 6 Jan 2010 23:59:31 +0000 (+0300) Subject: drm/radeon: mkregtable.c: close a file before exit X-Git-Tag: MMI-PSA29.97-13-9~25013^2~35^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=059d233f9c1183ed2f59d631e4daf486060e880d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/radeon: mkregtable.c: close a file before exit Signed-off-by: Alexander Beregalov Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/mkregtable.c b/drivers/gpu/drm/radeon/mkregtable.c index 0d79577c1576..607241c6a8a9 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 */