It is narrated from Sayyiduna Sahl bin Sa'd (may Allah be pleased with him) that a man peeped at the Prophet (peace and blessings be upon him) from the place of the curtain of the apartment, while the Prophet (peace and blessings be upon him) had a comb in his hand. So the Prophet (peace and blessings be upon him) said: "Had I known that this man was waiting for me to come to him, I would have thrust this comb into his eye. Seeking permission has only been prescribed because of the sight."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 5639