حَدَّثَنَا عَبْدُ السَّلاَمِ بْنُ عَتِيقٍ، حَدَّثَنَا أَبُو مُسْهِرٍ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ عَبْدِ اللَّهِ، - يَعْنِي ابْنَ سَمَاعَةَ - حَدَّثَنَا الأَوْزَاعِيُّ، حَدَّثَنِي سُلَيْمَانُ بْنُ حَبِيبٍ، عَنْ أَبِي أُمَامَةَ الْبَاهِلِيِّ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ ثَلاَثَةٌ كُلُّهُمْ ضَامِنٌ عَلَى اللَّهِ عَزَّ وَجَلَّ رَجُلٌ خَرَجَ غَازِيًا فِي سَبِيلِ اللَّهِ فَهُوَ ضَامِنٌ عَلَى اللَّهِ حَتَّى يَتَوَفَّاهُ فَيُدْخِلَهُ الْجَنَّةَ أَوْ يَرُدَّهُ بِمَا نَالَ مِنْ أَجْرٍ وَغَنِيمَةٍ وَرَجُلٌ رَاحَ إِلَى الْمَسْجِدِ فَهُوَ ضَامِنٌ عَلَى اللَّهِ حَتَّى يَتَوَفَّاهُ فَيُدْخِلَهُ الْجَنَّةَ أَوْ يَرُدَّهُ بِمَا نَالَ مِنْ أَجْرٍ وَغَنِيمَةٍ وَرَجُلٌ دَخَلَ بَيْتَهُ بِسَلاَمٍ فَهُوَ ضَامِنٌ عَلَى اللَّهِ عَزَّ وَجَلَّ ‏"‏ ‏.‏

Abu Umamat Al Bahili reported the Apostle of Allaah(PBUH) as saying “There are three persons who are in the security of Allaah, the Exalted.” “A man who goes out on an expedition to fight in the path of Allaah, the Exalted, is in the security of Allaah, until He takes him unto Him(i.e., he dies) and brings him into Paradise or brings him(alive) with reward and booty he obtains and a man who goes to the mosque is in the security of Allaah, until he takes him unto Him(i.e., he dies), and he brings him into Paradise or brings him with reward and spoils he obtains; and a man who enters his house after giving salutation is in the security of Allaah, the Exalted.” Translation Not Available

Book Ref: Sunan Abi Dawud Book 15 Hadith 2494
Web Ref:  Sunan Abi Dawud Book 14 Hadith 2488