قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " نِعِمَّا لِلْمَمْلُوكِ أَنْ يَتَوَفَّاهُ اللَّهُ بِحُسْنِ طَاعَةَ رَبِّهِ وَطَاعَةَ سَيِّدِهِ، نِعِمَّا لَهُ، نِعِمَّا لَهُ "
And the Messenger of Allah, peace and blessings be upon him, said: "How excellent is that slave whom Allah causes to depart from this world while obeying his Lord and his master in the best manner; this is very good for him, this is very good for him."
Related hadith on this topic