The correct answer is: E. No error

The sentence is grammatically correct. The word "to" is used twice in the sentence, but this is not incorrect. The first "to" is a preposition, and the second "to" is an infinitive marker. The infinitive marker "to" is used to introduce the infinitive verb "indulge."

The sentence can be rewritten as follows:

The Head of the Department advised all the staff not to indulge in gossip.

The sentence can also be rewritten as follows:

The Head of the Department advised all the staff to avoid gossip.