Al-Ghazali reported: Ibn al-Samak, may Allah have mercy on him, said on his death bed, “O Allah, you know that if I disobeyed you, I still loved those who obeyed you. Make that a means of nearness to you.”
Source: Iḥyā’ ‘Ulūm al-Dīn 2/160
عن الغزالي وقال ابن السماك رحمه الله عند موته اللهم إنك تعلم أني إذا كنت أعصيك كنت أحب من يطيعك فاجعل ذلك قربة لي إليك
2/160 إحياء علوم الدين