From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- sysfs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/sysfs.c b/sysfs.c index 05f0118..10e1597 100644 --- a/sysfs.c +++ b/sysfs.c @@ -804,6 +804,8 @@ int sysfs_unique_holder(int devnum, long rdev) } n = read(fd, buf, sizeof(buf)-1); close(fd); + if (n < 0) + continue; buf[n] = 0; if (sscanf(buf, "%d:%d%c", &mj, &mn, &c) != 3 || c != '\n') { -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html