In verse 121 of Surah 20 we read:
وعصی آدم ربه فغوی
َAdam disobeyed his Lord and went amiss
Did Adam really commit a sin? Isn't it impossible for a Prophet to commit a sin? Isn't it right that a Prophet must be infallible?
At other place Allah describes Adam's position as :
وَلَقَدْ عَهِدْنَآ إِلَى ءَادَمَ مِن قَبْلُ فَنَسِىَ وَلَمْ نَجِدْ لَهُ عَزْماً
(And indeed We made a covenant with Adam before, but he forgot, and We found on his part no firm willpower) --"Qur'an 20:115"
So, it was not something which Adam was determined to do, it was just a mistake, a forgetfulness. I think that clears the issue.