Al-An'am - 6:88

ذَلِكَ هُدَى اللّهِ يَهْدِي بِهِ مَن يَشَاء مِنْ عِبَادِهِ وَلَوْ أَشْرَكُواْ لَحَبِطَ عَنْهُم مَّا كَانُواْ يَعْمَلُونَ
[6:88]
This is Allah's guidance, He guides thereby whom He pleases of His servants; and if they had set up others (with Him), certainly what they did would have become ineffectual for them.
This is the guidance of Allah: He giveth that guidance to whom He pleaseth, of His worshippers. If they were to join other gods with Him, all that they did would be vain for them.
Such is the guidance of Allah wherewith He guideth whom He will of His bondmen. But if they had set up (for worship) aught beside Him, (all) that they did would have been vain.