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>
This commit is contained in:
parent
b0a658ffbc
commit
36614e9546
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue