Obviously this is a broad question. The final decision on returning to diving depends on the nature of the problem and how well it heals. In general external canal surgery patients can return to diving as soon as the canal skin has completely healed. Middle ear surgery is more complicated. Middle ear problems are frequently caused by Eustachian tube dysfunction and this must be cleared up before the diver can go under pressure. If prostheses (artificial ear bones) are used, there is controversy between Otologists about returning to diving. The diver should consult with his or her surgeon.
Inner ear surgery involving removal of the stapes bone or the placement of a stapes prosthesis (in otosclerosis) generally is a contraindication to diving. If you have had surgery for inner ear barotrauma, many diving physicians would advise against any further diving. Another group of diving physicians would allow returning to diving if there is no significant residual hearing loss, no balance problems, and you can easily equalize your middle ear. After sinus surgery, the surgical site should be completely healed, and there should be clearing of the sinus problem. Any residual sinus disease might lead to a worsening of the original problem or significant complications.
Ultimately, you should follow the advice of your surgeon.