diff --git a/sys/src/9/port/devsd.c b/sys/src/9/port/devsd.c index d21106f19..09f885660 100644 --- a/sys/src/9/port/devsd.c +++ b/sys/src/9/port/devsd.c @@ -154,9 +154,7 @@ sddelpart(SDunit* unit, char* name) */ pp = unit->part; for(i = 0; i < unit->npart; i++){ - if(!pp->valid) - continue; - if(strcmp(name, pp->name) == 0) + if(pp->valid && strcmp(name, pp->name) == 0) break; pp++; }