summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2012-05-04 13:41:21 +0200
committerNeilBrown <neilb@suse.de>2012-05-07 09:08:36 +1000
commit36614e95466720619f458195f1a0486d7ff32c44 (patch)
tree0499316b4658d0ceb925238a29aa82fb32826e46
parentb0a658ffbcd2104594e8a7a185fa0fe05127723e (diff)
super-intel.c: Don't try to close negative fd
This should be harmless, but lets be consistent and not try to close a negative file descripter. Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super-intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index 2e85b6b1..ca15703e 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -4353,7 +4353,7 @@ static int get_super_block(struct intel_super **super_list, int devnum, char *de
} else {
if (s)
free(s);
- if (dfd)
+ if (dfd >= 0)
close(dfd);
}
if ((dfd >= 0) && (!keep_fd))