From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- Incremental.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Incremental.c b/Incremental.c index c2c9051..d3724a4 100644 --- a/Incremental.c +++ b/Incremental.c @@ -884,7 +884,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol, * to obtain minimum spare size */ struct supertype *st3 = dup_super(st2); int mdfd = open_dev(mp->devnum); - if (!mdfd) { + if (mdfd < 0) { free(st3); goto next; } -- 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