In any case, keep in mind that Spanish passports are issued immediately at the police station (without paying for any expedited processing as in other countries), so obtaining one is just a matter of getting an appointment (and there are usually more appointments for passports than for DNIs).