It could be an ear infection...or, it could be ear mites.
I think Annie is right on target. Ear mites are a common problem. If your dog is doing an inordinate amount of head shaking, this could definitely be a sign of mites.
They can cause a significant amount of dryness in the ear with the head shaking and scratching at the ears increasing as the corn oil and mineral oil are home remedies for the mites.
Use a cotton ball to dab in the ears. Be sure not to force your finger in beyond the point where you meet resistance. You could do serious damage to the ear by going in too far, possibly even deafness.