From Sahih Bukhari (Hadith 3325):
Narrated Sufyan bin Abi Zuhair Ash-Shanai:That he heard Allah's Messenger (ﷺ) saying, "If somebody keeps a dog that is neither used for farm work nor for guarding the livestock, he will lose one Qirat (of the reward) of his good deeds everyday
Reference: Bukhari 3325