It is narrated from Sayyiduna Ubadah bin al-Samit (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Whoever fights in jihad while his intention is not jihad but rather the wealth of the spoils, he will receive only that which he intended."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الفيء والغنيمة / 12908