diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2012-05-04 13:41:21 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-05-07 09:08:36 +1000 |
commit | 36614e95466720619f458195f1a0486d7ff32c44 (patch) | |
tree | 0499316b4658d0ceb925238a29aa82fb32826e46 | |
parent | b0a658ffbcd2104594e8a7a185fa0fe05127723e (diff) | |
download | mdadm-36614e95466720619f458195f1a0486d7ff32c44.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c index 2e85b6b..ca15703 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)) |