Like SomebodyElse, it's been my experience that yeast infections in ears, if they're recurring, are generally linked to food allergies*. Toby, my lab mix, gets a yeast infection if he gets just a small amount of corn. The dogs get homecooked, but on the few occasions when I buy commercial food, I have to avoid most brands because they contain corn.
Corn gives a lot of animals problems of various kinds, and it's the predominant ingredient in most commercial foods.
*Some cold weather breeds, with ears that "seal" themselves against the cold, are prone to yeast infections in more temperate climates, uless regularly cleaned and kept dry.