Cleaning a dog's ears can prevent an infection, not treat one. If you suspect your dog might have an ear infection, fleas, ear mites or an allergic reaction, consult a veterinarian.