It is narrated from Sayyiduna Abu Ayyub al-Ansari (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever meets the enemy and remains steadfast until he is killed or prevails will not be put to trial (the questioning) in his grave."
Hadith Referenceالمعجم الكبير للطبراني / باب الخاء / 4079