In Şaĥīĥ Muslim, in the ĥadīth of ascension narrated by Sayyidunā Anas ibn Mālik I, it is mentioned that his ﷺ blessed chest was split open, his blessed heart taken out and rinsed, and ‘a portion for the devil’ was removed.
Qāđī Íyāđ, the famous ĥadīth master who lived in the sixth century, writes in his commentary, Ikmāl al-Múlim:
Concerning the statement: “And then from [his heart] a crumb was removed; and said: ‘this is the portion for the devil from you.’”
This is manifest evidence that our Prophet ﷺ is divinely protected from the devil and is immune from him. And that the devil’s influence can never be cast upon him: neither in his knowledge nor in his faith; neither in his blessed body nor in anything related to him; and that the devil can never trouble him or whisper in his heart [wasāwis] or any such thing.
Scholars have reported unanimity of agreement and scholarly consensus on this issue.
Our assertion is validated from authentic narrations, that Allāh táālā has aided him such that [the qarīn] will not enjoin except that which is righteous; or that he [the qarīn] has become a Muslim [aslama] or that RasūlAllāh ﷺ is vouchsafed from him [aslamu] or he has surrendered to his ﷺ wish [istaslama] as mentioned in another narration. RasūlAllāh ﷺ has said: “It is impossible for him to cast influence or have control over me.”
Further, he clarifies the specific issue thus:
It can be explained that this crumb removed from his blessed heart was that portion in which love of this world and desire reside; which is the [doorway] through which the devil enters [the heart]. Or that it is a region in which heedlessness and forgetfulness abide – and all this, being the Divine Plan of the Most Honorable; the Wise, the Powerful.
These are doorways through which the devil enters, and these doorways were eliminated from his blessed heart so that the devil has no way to enter; similar to Sayyidunā Yaĥyā, in whom, the desire for women was eliminated.
Or this portion – if it was a portion of the heart, at all – is that part which accepts whisperings of the devil, and that which instigates the lower-self [nafs]; this portion was removed from his ﷺ blessed heart so that it shall remain pristine and pure; the heart was [also] rinsed so that any trace of this portion is also cleared away such that his blessed heart remains unblemished forever.”
His blessed heart was never blemished; the doorway from which the devil could potentially enter was removed; and he had not entered at all. Mullā Álī al-Qārī says:[1]
...that is, it would have become the portion of the devil, if it was left unattended; and left thus without being cleansed.
Imām Sanūsī says in Mukammilu Ikmāl al-Ikmāl:
Suhaylī said it is perhaps that part [in the heart] which is poked by the devil, present in every newborn except Sayyidunā ‘Isa and his mother (peace and blessings upon them) because of the prayer of her mother: “Verily, I seek your refuge for her and her offspring, from Shaytān, the accursed.” This does not prove in any way that Sayyidunā ‘Isa S is superior to RasūlAllāh ﷺ because this part was [anyway] removed from his heart, rinsed and filled with wisdom and faith.
[1] - Sharĥ al-Shifā, 2: 203.
