Was the Prophet sinless?
Praise be to Allah, the Lord of the World; and blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
All the scholars of Islam are agreed that the Prophet (and all the other Prophets) was infallible. He did not commit any major sins nor did he make any error or mistake while conveying the revelation. Allah Says (interpretation of meaning): {Nor does he speak of (his own) desire. It is only an Inspiration that is inspired.}[53:3-4]
Allah taught him so he did not forget but what Allah wanted him to forget. Allah also gathered the Qur'an in his chest. Allah Says (interpretation of meaning): {We shall make you to recite (the Qur'ân), so you (O Muhammad ()) shall not forget (it), Except what Allâh, may will,…}[87:6-7].
Allah also Says (interpretation of meaning): {It is for Us to collect it and to give you (O Muhammad SAW) the ability to recite it (the Qur'ân), And when We have recited it to you [O Muhammadthrough Jibrael (Gabriel)], then follow you its (the Qur'ân's) recital.} [75:17-18].
As for the minor sins, there is a disagreement of the scholars about whether the Prophet ever committed them or not. Some scholars believe that the Prophet was not infallible as far as committing minor sins is concerned. Others state the opposite. They believe that whenever the Prophet, or any Prophet, commits a minor sin immediately Allah directs him to the right thing not leaving him on his error. If he commits a minor sin, it is not considered defect and does not have any negative impact on his infallibility. He is a human being upon whom Allah has bestowed the gift of Prophethood. Immediately after committing a minor sin, he makes repentance of Allah, and seeks His forgiveness. No doubt, Allah forgives all sins of sincerely repented.
But it is enough for the Prophet that Allah Says (interpretation of meaning) about him: "And verily, you (O Muhammad SAW) are on an exalted standard of character." [68:4].
May Allah bless him and pray upon him.
Allah knows best.
You can search for fatwa through many choices