Thread (15 messages) 15 messages, 2 authors, 2011-11-03
STALE5345d

[PATCH 08/12] ahci_enumerate_ports(): Don't close fd that failed to open

From: <hidden>
Date: 2011-11-02 14:42:13
Subsystem: the rest · Maintainer: Linus Torvalds

From: Jes Sorensen <redacted>

Signed-off-by: Jes Sorensen <redacted>
---
 super-intel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 0193fe7..b583b35 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1572,8 +1572,8 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b
 				printf(" (%.*s)\n", MAX_RAID_SERIAL_LEN, buf);
 			else
 				printf(" ()\n");
+			close(fd);
 		}
-		close(fd);
 		free(path);
 		path = NULL;
 	}
-- 
1.7.6.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help