mtd: always initialize retlen to zero